Re: [PHP-DB] not a valid MySQL result

2003-08-01 Thread Jason Wong
On Saturday 02 August 2003 11:48, Lee Templeton wrote: > The first row retrieved from the results list works and returns the row > with Resource id #3 prefixed to the prinouts. After the first row all > futher retrievals fail. The variable $results is stressed by being forced to do two different

RE: [PHP-DB] not a valid MySQL result resource

2003-01-20 Thread John W. Holmes
When you get that error, it generally means your query failed, or you have the wrong variable in a mysql_fetch_*() function. Use mysql_error() to see what the error is if the query failed. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://

Re: [PHP-DB] not a valid MySQL result

2002-09-06 Thread Jim Hunter
Oops, you have one more error that I see, one one line you reference author-cat as a table name and on another you refer to it as author_cat. Make the appropriate change and try it again. One of the table references is wrong and will generate a missing table error. Jim ---Original Messag

RE: [PHP-DB] not a valid MySQL result

2002-09-06 Thread Jim Hunter
lumn to be called or leave the "as somenewcolname" part off if you don't care what the column name is. This should help. Jim ---Original Message--- From: Wilmar Perez Date: Friday, September 06, 2002 12:16:28 To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] not a vali

RE: [PHP-DB] not a valid MySQL result

2002-09-06 Thread Wilmar Perez
Hi guys Thanks for your help. Peter was right I had an error in the sentence, I worked it out but still the same error came up. The mysql_error() function doesn't return any thing. Any idea? Thanks a lot. >Hi >Couple of points, you probably have an SQL error, >I use >echo $query; >echo

RE: [PHP-DB] not a valid MySQL result

2002-09-06 Thread Peter Lovatt
Hi Couple of points, you probably have an SQL error, I use echo $query; echo ''.mysql_error(); which shows the query and the error you use 'author-cat' in the table name and 'author_cat' and 'author-cat' in the where clause which will throw an error. HTH Peter ---

Re: [PHP-DB] not a valid MySQL result

2002-09-06 Thread bbonkosk
Hello, It's always good practice to put some error detection in your code, i.e. $result = mysql_query($query) or die(mysql_error()); I think your problem is the mysql does not like your query, but you are not catching it until PHP tries to figure out the number of rows returned by the query.

RE: [PHP-DB] Not a valid MySQL result resource

2001-11-09 Thread matt stewart
e: [PHP-DB] Not a valid MySQL result resource > //.../... first part of the code is to connect to the right DB on a MySQL > server. It works fine > //This code to show the query. It runs well under MySQL and gives 1 result : > $query="SELECT Login, Password FROM `user` WHER

Re: [PHP-DB] Not a valid MySQL result resource

2001-11-08 Thread Miles Thompson
I'd check for mysql_num_rows( $result_query) > 0 as well. It's entirely possible the user mis-typed the login or password values. Miles At 07:26 PM 11/8/01 -0600, Paul DuBois wrote: >At 2:04 AM +0100 11/9/01, MPropre wrote: >>>//.../... first part of the code is to connect to the right DB on a My

Re: [PHP-DB] Not a valid MySQL result resource

2001-11-08 Thread DL Neil
> //.../... first part of the code is to connect to the right DB on a MySQL > server. It works fine > //This code to show the query. It runs well under MySQL and gives 1 result : > $query="SELECT Login, Password FROM `user` WHERE user.login=''$login'' and > user.password=''$password''"; > //This

Re: [PHP-DB] Not a valid MySQL result resource

2001-11-08 Thread Paul DuBois
At 2:04 AM +0100 11/9/01, MPropre wrote: >//.../... first part of the code is to connect to the right DB on a MySQL >server. It works fine > > >//This code to show the query. It runs well under MySQL and gives 1 result : > $query="SELECT Login, Password FROM `user` WHERE user.login=''$login'' and