fetchrow error when using ORDER BY in SELECT
| From: | Shane Antyr | Date: | Fri, 03 Jan 2003 18:52:27 +0000 |
| Subject: | fetchrow error when using ORDER BY in SELECT | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-3177@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I'm getting this error when I try to order my query results (using a mySQL db):
'Call to undefined function: fetchrow()'
The code I'm using looks like this:
if($subtype =='all' || $subtype =='All'){
$stmt = "SELECT * FROM dparker.guide_business
WHERE dining = '1' ORDER BY business_name";
}
else{
$stmt = "SELECT * FROM dparker.guide_business
WHERE dining = '1' AND subtype='$subtype' ORDER BY business_name";
}
// 'prepare' query
$result[business] = $stmbtmag_dbh->query($stmt);
// get array of results
while ($row[business] =
$result[business]->fetchrow(DB_FETCHMODE_ORDERED)) { ...
Am I missing something here?
- -Shane
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (Darwin)
iD8DBQE+FdvymU+jltT1nOoRAtn4AJ0eUbkOMd45XQ3U2GiME0TyakIBzQCZAT6w
K7J/ChstkDZf8Lfc4nm/X7s=
=hxOZ
-----END PGP SIGNATURE-----