I have a question....Im hoping someone can point me in the right Direction....
I have the query code below. Now I want to show all records but if the query returns no data or is blank/zero then give a value to it so it still shows on the page and doesnt return an error.
Ive tried a few ways, searched the boards and this is a call to all. This is what i reckoned... am i close or nowhere near.
//////////// Query To Get Total Games Played ////////////////////
$query1="Select * FROM Darts_SGS WHERE Darts_SGS.Player='$name'";
mysql_query($query1);
// execute SQL query and get result
$sql_result1 = mysql_query($query1,$connection)
or die("Couldn't execute query1.");
$Total_Games = mysql_num_rows ($sql_result1)
or die ("The query: '$query' did not return any data");
If ($Total_Games == "")
{
$Total_Games = "0";
}
Else
{
}
/////////////////////////////////////////////////////