Re: Thanks but problem Again! (MySQL & PHP database script PLEASE)

From: Date: Fri, 22 Oct 2004 16:15:10 +0000
Subject: Re: Thanks but problem Again! (MySQL & PHP database script PLEASE)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-200097@lists.php.net to get a copy of this message
> Thank you for two of you. Im amazed how quick the replys were. Very > pleased. > When I simply inserted the PHP sentense, it worked. > But as I turned off register_globals, > and changed as Matthew suggested, it looked like this: > > Warning: mysql_num_rows(): supplied argument is not a valid MySQL result > resource in c:\apache\htdocs\momatlib\gen_search1.php on line 49 > Records Available > > Warning: mysql_fetch_array(): supplied argument is not a valid MySQL > result > resource in c:\apache\htdocs\momatlib\gen_search1.php on line 52 > BTW > > When I added this (or die("Bad query: ".mysql_error()); ) in this part > ($result = mysql_query...) > > Ive got this. > > Bad query: You have an error in your SQL syntax near 'and Tit like and Aut > like and Auty like ' at line 4 > > Ramil and Dan are probably correct. There's something not right with your query string. A good test to try is to run the query from the mysql prompt and substitute the vars with actual values and see if it returns correctly. -- --Matthew Sims --<http://killermookie.org>

« previous php.general (#200097) next »