Re: [PHP] what is the problem with this query?

2005-12-30 Thread sunaram patir
thanks. i have resolved the problem by replacing 'read' with 'read_it'. On 12/30/05, Michael Gross [EMAIL PROTECTED] wrote: read is a reserved word in mysql (http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html). You have to double-quote reserved words: mysql_query(SELECT * FROM mailbox

Re: [PHP] what is the problem with this query?

2005-12-30 Thread Richard Lynch
On Thu, December 29, 2005 7:26 am, sunaram patir wrote: could you please tell me what is the problem with this query mysql_query(SELECT * FROM mailbox WHERE read=''); Nope. Because on the face of it, there is NOTHING wrong with the query written above, per se. i always get this

[PHP] what is the problem with this query?

2005-12-29 Thread sunaram patir
hi there, could you please tell me what is the problem with this query mysql_query(SELECT * FROM mailbox WHERE read=''); i always get this warning: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in index.php on line 24 -- PHP General Mailing List

RE: [PHP] what is the problem with this query?

2005-12-29 Thread Jay Blanchard
[snip] could you please tell me what is the problem with this query mysql_query(SELECT * FROM mailbox WHERE read=''); i always get this warning: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in index.php on line 24 [/snip] THere is no apparent problem

Re: [PHP] what is the problem with this query?

2005-12-29 Thread Graham Cossey
On 12/29/05, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] could you please tell me what is the problem with this query mysql_query(SELECT * FROM mailbox WHERE read=''); i always get this warning: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in

Re: [PHP] what is the problem with this query?

2005-12-29 Thread Michael Gross
read is a reserved word in mysql (http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html). You have to double-quote reserved words: mysql_query(SELECT * FROM mailbox WHERE \read\=''); Graham Cossey wrote: On 12/29/05, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] could you please