bugphpGroupWare - Bugs: bug #6557, Bug in Postgres Code

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #6557: Bug in Postgres Code

Submitted by:  None
Submitted on:  Fri 14 Nov 2003 01:04:11 PM UTC  
 
Item Group: NoneCategory: API - phpGroupware API
Severity: 3 - NormalPriority: 5 - Normal
Status: InvalidPrivacy: Public
Assigned to: Dave Hall <skwashd>Open/Closed: Closed
Component Version: SVNOperating System: GNU/Linux - SuSE
Reproducibility: Every TimePlanned Release: None
Fixed Release: 

Tue 25 Nov 2003 10:04:35 PM UTC, comment #2:

The suggested fix it not suitable for all cases. I am closing this bug report as it is too broad and we are aware of the issue and are working on it for the 0.9.16 release.

Dave Hall <skwashd>
Project AdministratorIn charge of this item.
Tue 18 Nov 2003 12:46:17 AM UTC, comment #1:

This did not work, here is my error:

Database error: Invalid SQL: SELECT * FROM phpgw_accounts WHERE account_id='0'
PostgreSQL Error: 1 (ERROR: pg_atoi: zero-length string )

File: /var/www/localhost/htdocs/phpgroupware/phpgwapi/inc/class.accounts_sql.inc.php
Line: 50

Session halted.

Anonymous
Fri 14 Nov 2003 01:04:11 PM UTC, original submission:

PHPGroupware submits a lot of Queries in the Form
SELECT * FROM TABLE WHERE id=''
Postgres doesn't like this. (Because id is numerical. '' indicates a string, therefore Postgres is confused)
I fixed this with the Workaround below:

diff class.db_pgsql.inc.php class.db_pgsql.inc.php.orig
211,216d210
< /* Postgres chokes on Queries like WHERE id='' */
< /* We only do the replacement if this is a Select */
< if (strpos(strtoupper($Query_String) , "SELECT" ) !== false )
< {
< $Query_String = str_replace("''","'0'",$Query_String);
< }

This is not a permanent solution, it would be better to fix the problem itself.

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 25 Nov 2003 10:04:35 PM UTCskwashdAssigned toNone=>NA
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1