Re: SQL command in MySQL and PostgreSQL
| From: | Arnaud Limbourg | Date: | Wed, 26 Nov 2003 06:07:18 +0000 |
| Subject: | Re: SQL command in MySQL and PostgreSQL | ||
| References: | 1 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-239@lists.php.net to get a copy of this message | ||
Hi,
you will be better off for an answer by posting this message to pear-general@lists.php.net
Arnaud.
> Hello all,
>
> 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?
>
> --
> Nguyen Hung Vu
>
> --
> PEAR QA Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>