Re: Attempting to search a MySQL database from PHP not working

From: Date: Thu, 31 May 2007 21:43:59 +0000
Subject: Re: Attempting to search a MySQL database from PHP not working
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-255934@lists.php.net to get a copy of this message
On Thu, May 31, 2007 2:25 pm, Jason Pruim wrote: > Hi Everyone, I am attempting to setup a search field on a database > application I'm dinking around with and running into problems that > I'm hoping someone might be able to shed some light on. > > Here is the code I am using to display the results of the search: > > echo ('<table border="1">'); > echo "<tr><th>First > Name</th><th>Author</th><th>Pages</th></tr>"; > > $result_row[] = mysql_query($query) or die(mysql_error()); I also have to wonder why you are building an array of query result resources... You probably could do this with just one SQL query and some order by clauses to get what you want, without hitting the DB so much. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#255934) next »