I need chek if the title insert exist on the DB, before insert that item, then I use:
$checkcTitle = "select COUNT(*) from comercials were cTitle=".$title."";
$result = mysql_query($checkcTitle);
if (mysql_result($result,0) > 0){
//if (!$result){
echo "that Comercial Name (".$title.")is taken -go back and chose another one.";
echo $checkcTitle;
}else{
here the insert
}
But I got an error:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /bdb3.php on line 78
the line 78 is:
if (mysql_result($result,0) > 0){
whiy I have this error.?
How to correct?
Thanks!
😉 😉