Duffman12
10-27-2006, 05:59 AM
so, i want to grab the value of a sql entry. but the thing is, sometimes this value is <NULL>. i thought, no biggy, i'll just have an if statement:
if (is_numeric(mysql_result($query, 0))) {
//do something
} else {
//do something else using mysql_result($category_id_query, 0);
}
however, this doe not work. i get this error:
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3
is there a way to check to see if mysql_result() is <NULL> without throwing an error??
if (is_numeric(mysql_result($query, 0))) {
//do something
} else {
//do something else using mysql_result($category_id_query, 0);
}
however, this doe not work. i get this error:
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3
is there a way to check to see if mysql_result() is <NULL> without throwing an error??