This is my first time trying out PHP with mySQL (ASP convert), and I can't figure out why this won't work. I can loop through results, but in this case, I only want the first row of data. I get this error...
Supplied argument is not a valid MySQL result resource
For the line marked with >>
$connDB = mysql_connect("localhost","general","general");
mysql_select_db("tbl_users_ln",$connD😎;
$strSQL = "SELECT userID, userName, userLevel FROM tbl_users_ln WHERE
userName = '".$HTTP_POST_VARS['fldUserName']."' AND
userPass = '".md5($HTTP_POST_VARS['fldUserPass'])."' AND
userLevel = 'a'";
$query = mysql_query($strSQL);
$result = mysql_fetch_row($query); //this is the line it gives me an error on
if ($result = false) { return false; }
$userInfo = array($result[0],$result[1],$result[2]);
mysql_close($connD😎;
I'm sure it's something simple, but I've read the docs and I can't find what I'm missing. Thx.
Jake