|
Posted by smorrey on 10/03/05 11:28
Assuming this...
$_SESSION['db'] = new PDO(
"pgsql:dbname=test;host=localhost",
"biocoinadmin",
"xxxxxxxxxx"
);
What is wrong with this (line breaks added for clarity)?
$sql = "SELECT * FROM public.authinfo WHERE uid = '$uid'";
if ($_SESSION['db']->fetchAll(
$_SESSION['db']->query($sql)) > 0
){
dosomething();
}else{
dosomethingelse();
}
I keep getting this error...
Fatal error: Call to undefined method PDO::fetchAll() in
/home/testcode/public_html/header.php on line 114
This doesn't make sense, because every other query I issue on the DB
seems to be working great. This is the first time anykind of fetch is
used, and it should just let me know if there is any data at all, as a
result of the query right? I'm not asking for anything specific just a
yes or no as to whether that uid exists in the DB.
Any advice here?
Navigation:
[Reply to this message]
|