MySQL Forums
Forum List  »  PHP

fetch/return multiple rows for query
Posted by: Douglas McArthur
Date: July 05, 2005 06:23AM

How do folks,

Creating a search facility for a site and stumbled across a problem. Not the greatest with PHP as I`m still learning.

Basically I have the script below:

PHP:
/*define variable linked with the input fields value*/
$search_criteria = ['find'];

/*start the search*/
if(isset(['find'])) {
$result = mysql_query("SELECT pagetitle, description FROM tblPageFinders WHERE pagetitle = '%$search_criteria%' LIMIT 10")
$i = 0;
while($i < mysql_fetch_row($result)) {
echo "$i:<br /> \n";
}
}


what I`m having trouble doing is displaying the results.

How do I get the results [ multiple rows ] displayed like they would be on Google or another search engine. Obviously not in Googles detail, but that format.

I.E.

result1
result2
result3
resultn

Thanks.

Options: ReplyQuote


Subject
Written By
Posted
fetch/return multiple rows for query
July 05, 2005 06:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.