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
Post a Comment