|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-09-19 07:24 UTC] kalowsky@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 04:00:02 2025 UTC |
When using the same code in 2 pages (only the query is different), I checked that odbc_num_rows gives -1 in one of them (the other is ok). I check the SQL statement, and I conclude: - if I use ORDER BY (SELECT .. FROM ... ORDER BY ...) the function odbc_num_rows gives me the right number; - if I remove the ORDER BY (SELECT .. FROM ...), the odbc_num_rows gives -1 code: $sql=("SELECT id,term FROM dict WHERE state IN (0,1) ORDER BY term"); $result=odbc_exec($db,$sql); ... if (odbc_num_rows($result)==0) ...