pear DB
| From: | Anoop Bhat | Date: | Thu, 19 May 2005 13:30:32 +0000 |
| Subject: | pear DB | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19279@lists.php.net to get a copy of this message | ||
Thanks for the quick response.
also, is there anything in place that will tell me the operations that are supported between certain db's with pear DB?
for example,
i used odbc to connect to a MSSQL server but the function numRows() was not supported with pear DB odbc (which i believe is supported with the unified odbc functions php.net/odbc).
So, if i switched my dsn from mysql:// to odbc://, i would run into problems that could potentially not even surface.
I guess what i'm asking is, is there any way to know what operations/functions are supported/unsupported between the different phptypes for pear DB?
I understand this question is pretty unclear and can be a little ambigious as well.
any help is appreciated.
anoop
Justin Patrin wrote:
On 5/18/05, Anoop Bhat <abhat@interpublic.com> wrote:Unless you are the intended recipient (or authorized to receive this message for the intended recipient), you may not use, copy, disseminate or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail, and delete the message. Thank you very much. (A)Is there any way to get the column names from a query? like mysql_field_name. The db i'm using is infact mysql but i haven't seen a function where i can get the column names from the result of a query. is there some way to get the column names with pear DB?Well, you can use tableInfo() on the statement handle. *or* you can use DB_FETCHMODE_ASSOC. $sth = $db->query($sql); while ($rec = $sth->fetchRow(DB_FETCHMODE_ASSOC)) { print_r($rec); } print_r($sth->tableInfo()); This message contains information which may be confidential and privileged.