Here's one major issue I'm facing n dunno how to fix, if a mysql query returns nothing I get an error, what's the proper way to handle an empty query?
my unorthodox metho
Code
$query = mysql_query("SELECT pg_author, pg_pid FROM nuke_pagesetter_pubdata1 WHERE pg_author='Admin'") or die(mysql_error());
$exists = mysql_result($query,0,"pg_author");
if ($exists == "Admin") {
do this because the query returned a result
} else {
do nothing
}
$exists = mysql_result($query,0,"pg_author");
if ($exists == "Admin") {
do this because the query returned a result
} else {
do nothing
}
i get this error sometimes even t hough everything still works
mysql_result(): Unable to jump to row 0 on MySQL result index
