Re: fetchrow error when using ORDER BY in SELECT
| From: | Shane Antyr | Date: | Fri, 03 Jan 2003 19:03:36 +0000 |
| Subject: | Re: fetchrow error when using ORDER BY in SELECT | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-3178@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Nevermind. I had a brain fart and tried to order by a column that wasn't in the table. sry.
On Friday, January 3, 2003, at 11:52 AM, Shane Antyr wrote:
-----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----- -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -----BEGIN PGP SIGNATURE-----Version: GnuPG v1.2.1 (Darwin) iD8DBQE+Fd6NmU+jltT1nOoRAnJBAJ9A/9K36ewLslBYBN0KnSWwikTZowCfSKeV epD1EpT1oSNkAcBFCH2XQJs= =0ApV -----END PGP SIGNATURE-----