For some reason this code still returns 2 instead of one?
$allowedCount = 1; ( This figure is set inside the database )
$sql_count = mysql_query("SELECT usrid FROM mytable WHERE usrid=".$uid) or die(mysql_error());
$currentCount = mysql_num_rows( $sql_count );
$currentCount = 1; ( In this example current count returns a 1 )
if ( $currentCount <= $allowedCount ) {
// do this OK
} else {
// do this Not OK
}
What im trying to do is check if the user has reached their limit, if so then disallow them further INSERT queries etc....
Would this be a simple approach?