note 35840 added to function.odbc-num-rows
| From: | avodiez at hotmail dot com | Date: | Tue, 16 Sep 2003 16:36:00 +0000 |
| Subject: | note 35840 added to function.odbc-num-rows | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-56579@lists.php.net to get a copy of this message | ||
I've found a little mistake while trying deejay_'s function against an ODBC SQL Server
driver.
If you work with that database, subqueries must be named. So if you are trying to get record number
deejay_'s way, you must use AS statement when passing SELECT count(*) query as this:
where is
$countQueryString="SELECT count(*) as result FROM (".$query.")";
might be
$countQuerySrting="SELECT count(*) as result FROM (".$query.") AS anyNameYouLike
";
As well, be carefull with ORDER BY statements in subqueries as they are not accepted unless they
with TOP modifyers.
Avo
----
Manual Page -- http://www.php.net/manual/en/function.odbc-num-rows.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35840
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35840&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35840&report=yes