if someone searches my mysql database, the database will only display one result when there is only one match.
If there is multipul matches in the database, the database returns 0 results.
how can i code it to display more than one result?
this is what i have....
// Build a query:
$query = "SELECT * FROM listings WHERE MATCH trading AGAINST ('$searchValue')";
// Run the query.
$result = mysql_query($query);
if(!$result) {
echo "Query $query failed.";
// If the query failed
echo mysql_error();
} else {
// test the number of rows in the result set:
if(!mysql_num_rows($result)) {
echo "Query $query returned no results.";
} else {
while($data = mysql_fetch_array($result)) {
// display output
}
all help is greatly appreciated