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

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

 




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?

-- 
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