[Top][All Lists]
[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: |
Tue, 25 Nov 2003 17:04:36 -0500 |
User-agent: |
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031007 |
=================== BUG #6557: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6557&group_id=509
Changes by: Dave Hall <address@hidden>
Date: Wed 11/26/2003 at 09:04 (Australia/Melbourne)
What | Removed | Added
---------------------------------------------------------------------------
Assigned to | None | skwashd
Status | Open | Closed
------------------ Additional Follow-up Comments ----------------------------
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.
=================== BUG #6557: FULL BUG SNAPSHOT ===================
Submitted by: None Project: phpGroupWare
Submitted on: Sat 11/15/2003 at 00:04
Category: API - phpGWapi Bug Group: None
Severity: 5 - Major Priority: Normal
Resolution: Invalid Assigned to: skwashd
Status: Closed 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.
Follow-up Comments
*******************
-------------------------------------------------------
Date: Wed 11/26/2003 at 09:04 By: skwashd
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.
-------------------------------------------------------
Date: Thu 11/20/2003 at 17:34 By: eald
mmm, which version of phpgw are you using and with which PostgreSQL version?
0.9.14 is incompatible with pgsql >= 7.3 if this is the case tell me please to
close the bug because is invalid.
-------------------------------------------------------
Date: Tue 11/18/2003 at 11:46 By: None
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.
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/