Search Engine Problem
| From: | Mark Sweeney | Date: | Wed, 24 Oct 2001 22:10:16 +0000 |
| Subject: | Search Engine Problem | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-10003@lists.php.net to get a copy of this message | ||
Hey,
I am using this piece of code to display news articles based on the variables inputted by a user.
However, it will only display one article, never more, even if more are within the terms of the
"WHERE" clause. What am I doing wrong?
$search = mysql_query("SELECT news.ID, newstitle, newsdescription, newsdate, author, email FROM
news, authors WHERE $name LIKE '%$value%' AND authors.ID=AID ORDER BY news.ID DESC");
if (!search) {
echo("<p>Sorry, there are no matches for what you are looking for. Please try
again</p>");
exit();
}
Any help would be much appreciated
Mark