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(); } Mark, This piece of code interrogates MySQL and responds with a "result identifier resource" or ResourceSet or ResultSet or RecordSet, depending upon your terminology. How do you thereafter 'unpack' the rows from the resource set - using for eg mysql_fetch_assoc()? (else see manual) Have you tried copying that SELECT statement (substituting values appropriately) and running it under native SQL or in a 'management tool', to be sure it actually works (regardless of PHP)? Regards, =dn -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]