quick question:
How to check if row already exists in mysql?
I know some will suggest mysql_num_rows(), which I've tried and no good.
Here's the PHP code:
...
$chk = mysql_query("SELECT * FROM f_table WHERE f = '$id' AND h = 'h' AND status = '1'");
if(mysql_num_rows($chk) > 0){
$msg = 'exist';
}else{
$msg = 'gotta';
}
Ps: I just noticed that the php manual suggested us to use some else instead of 'mysql_num_rows()', and my mysql version is 5.0. Is it related?
Thank u for ur time.