Jump to content

Mysql Update error


fierdor

Recommended Posts

$x=mysql_query("SELECT level FROM members WHERE member_id='$username'");
if ($x==2)

 

You can't check against the data returned by mysql_query() alone - you need to run mysql_fetch_assoc() against $x to extract the data from it.

 

$query=mysql_query("SELECT level FROM members WHERE member_id='$username'");
$x=mysql_fetch_assoc($query);
if ($x['level']==2)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.