i am just checking wheather the name or the nick already exists or not. here is the code.m using mysql 5.5.24 with php 5.3.13 with apache 2.2.22.
$query="SELECT realname,nick FROM main WHERE `nick`='$nick' OR `email`='$email'";
$res=mysql_query($query);
if(mysql_num_rows($res)==0){
if it returns 0 thn the connection string follows and the insert statement. the problem is i am getting an error with mysql_num_rows statement
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean
everythng was working fine but later some updates changed. do i need to switch to mysqli if so how.