Re: quotes in SQL command

From: Date: Mon, 08 Dec 2003 08:00:51 +0000
Subject: Re: quotes in SQL command
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9352@lists.php.net to get a copy of this message
Hi! Nguyen Hung Vu ST wrote:
I tried to do an SELECT in PEAR:DB like below $sth = $db_pear->prepare("SELECT * FROM lists WHERE ID = ?"); but the problem is, that is OK for MySQL but in PostgreSQL, we will have to put ID inside double quotation ("), and it becomes $sth = $db_pear->prepare("SELECT * FROM lists WHERE \"ID\" = ?"); That is my problem when I tried to make my program works on both MysQL and PostgreSQL. Any ideas?
Yes, *create* your tables in PgSQL *without* using the quotes around attributes.

« previous php.pear.general (#9352) next »