mysql - PHP mysql_num_rows () expects parameter 1 to be resource -


i'm having problem being said on title simple code.

//only validate if date unique $checkdatequery = mysql_query("select top 1 * user_info date ='".mysql_real_escape_string(stripslashes($_request['date']))."'", $db); $rownumxx = mysql_num_rows($checkdatequery); if($rownumxx == 0) {  echo'you allowed proceed.'; } else {  echo'you not allowed proceed.'; } 

i'm not sure did wrong it. in advance help

there no top keyword in mysql , should make use of limit

should be

$checkdatequery = mysql_query("select * user_info date ='".mysql_real_escape_string(stripslashes($_request['date']))."' limit 1", $db); 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -