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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On May 31, 2007, at 5:43 PM, Richard Lynch wrote:



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.

To use the newbie scape goat, I don't know how else to do it, and it seems to work :)

What would you recommend?

I am always open to find ways to make my code better/faster/more secure.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux