This function is not working in my scripts.. Is there any other way I can perform this action with a diff. function?
if (mysql_num_rows($result) > 0)...
Well, what are you trying to test?
Try the below instead...
$result=mysql_query("SELECT * FROM table WHERE condition='something'",$db); $rows = mysql_num_rows($result); if ($rows > 0) { //do stuff }
if you are doing an insert or delete or update... you may have to use mysql_affected_rows() instead