Re: [PHP] Best way to figure out whether a query returns RESULT or NON-RESULT

2004-10-16 Thread Chris
Karam Chand wrote: Hello, I have an app where one module is similar to phpMyAdmin (well only .1%) with error_reporting() set to E_ALL. Now a user can execute any query. What is the best way to know whether a query is result or non-result. e.g. . . . Thanks in advance Regards, Karam As it

Re: [PHP] Best way to figure out whether a query returns RESULT or NON-RESULT

2004-10-16 Thread Karam Chand
Hello, mysql_query() returns non-false even if there was an UPDATE statement and the query was successful. But if I put the $result variable in mysql_num_rows() it returns an error, $result in invalid handle. I was asking how to know that where its an UPDATE statement so I dont call

Re: [PHP] Best way to figure out whether a query returns RESULT or NON-RESULT

2004-10-16 Thread Marek Kilimajer
Karam Chand wrote: Hello, mysql_query() returns non-false even if there was an UPDATE statement and the query was successful. But if I put the $result variable in mysql_num_rows() it returns an error, $result in invalid handle. I was asking how to know that where its an UPDATE statement so I

Re: [PHP] Best way to figure out whether a query returns RESULT or NON-RESULT

2004-10-16 Thread Karam Chand
Thanks. Never knew there existed (===). Silly me :) Regards, Karam --- Marek Kilimajer [EMAIL PROTECTED] wrote: Karam Chand wrote: Hello, mysql_query() returns non-false even if there was an UPDATE statement and the query was successful. But if I put the $result variable in

[PHP] Best way to figure out whether a query returns RESULT or NON-RESULT

2004-10-15 Thread Karam Chand
Hello, I have an app where one module is similar to phpMyAdmin (well only .1%) with error_reporting() set to E_ALL. Now a user can execute any query. What is the best way to know whether a query is result or non-result. e.g. $result = mysql_query ( $query, $mysql ); if ( !$result ) {