phpgroupware-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-tracker] [bug #6557] Bug in Postgres Code


From: nobody
Subject: [Phpgroupware-tracker] [bug #6557] Bug in Postgres Code
Date: Fri, 14 Nov 2003 08:04:14 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624

=================== BUG #6557: FULL BUG SNAPSHOT ===================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6557&group_id=509

Submitted by: None                    Project: phpGroupWare                 
Submitted on: Fri 11/14/2003 at 08:04
Category:  API - phpGWapi             Bug Group:  None                      
Severity:  5 - Major                  Priority:  Normal                     
Resolution:  None                     Assigned to:  None                    
Status:  Open                         Component Version:  CVS               
Platform Version:  Linux - SuSE       Reproducibility:  Every Time          

Summary:  Bug in Postgres Code 

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.



No Followups Have Been Posted


CC list is empty


No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6557&group_id=509

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]