[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Phpgroupware-developers] Patches for PostgreSQL??
From: |
Kai Hofmann |
Subject: |
RE: [Phpgroupware-developers] Patches for PostgreSQL?? |
Date: |
Fri, 21 Nov 2003 14:08:58 +0100 |
Hi Dani,
> When I used it, I got many "pg-atoi: Zero length string" errors.
>
> Does anybody know about the real status of this?
I don't know the exact status of the postgre support, but
I am working on SAPDB support - so the problem you mentioned
sounds familar to me.
The SQL statements itself are not a problem to my best knowledge,
its more the db_addslashes function that should be correctly
adapted for the corresponding database.
For SAPDB it looks like the following:
/**
* Escape strings before sending them to the database
*
* @param string $str the string to be escaped
* @return string escaped sting
*/
function db_addslashes($str)
{
return str_replace("'","''",$str);
}
thats because in SAPDB as well as in SYBASE databases (and ADABAS D I think)
a ' will be escaped by using it two times ''.
Replacing it with "NULL" is not what you really want. Maybe there are other
things
that have to be escaped by the addslashes function like \ or / etc.
but this depends on the database.
I have not tested the postgre support for now. But somebody around should
have it up and running.
Greetings
Kai
- [Phpgroupware-developers] Patches for PostgreSQL??, Dani Oderbolz, 2003/11/21
- RE: [Phpgroupware-developers] Patches for PostgreSQL??,
Kai Hofmann <=
- Re: [Phpgroupware-developers] Patches for PostgreSQL??, Chris Weiss, 2003/11/21
- Re: [Phpgroupware-developers] Patches for PostgreSQL??, Chris Weiss, 2003/11/21
- Re: [Phpgroupware-developers] Patches for PostgreSQL??, Brian Johnson, 2003/11/21
- Re: [Phpgroupware-developers] Patches for PostgreSQL??, Chris Weiss, 2003/11/21
- Re: [Phpgroupware-developers] Patches for PostgreSQL??, Brian Johnson, 2003/11/25
- Re: [Phpgroupware-developers] Patches for PostgreSQL??, Dave Hall, 2003/11/25