For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > August 2004 > DB.php, if and else on query?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author DB.php, if and else on query?
Louie Miranda

2004-08-09, 3:55 am

Hi, is it possible to do if and else on DB.php? I have tried adding this on..

$q = $db->query($sql);
if (DB::iserror($q)) {
die($q->getMessage());
} elseif ($q == 0}
die("zero value, found nothing..");
}

how can i make this work?

--
Louie Miranda
http://www.axishift.com
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com