Jump to content


Photo

mysql_num_rows problem


  • This topic is locked This topic is locked
1 reply to this topic

#1 DarkHavn

DarkHavn
  • Members
  • PipPipPip
  • Advanced Member
  • 69 posts

Posted 22 August 2006 - 02:59 AM


connect();
$username = $_POST['agentlogin'];
$pass = md5($_POST['agentpass']);

$mysqlquery = "SELECT * FROM agent WHERE `name`='$username' AND `pass`='$pass'";
$mysqlquery2 = mysql_query("$mysqlquery");
	if(mysql_num_rows("$mysqlquery2") == 1) {



Ok apparently this isn't a valid mysql result resource?

Eh anyone see anything wrong with this bit of code? as i can't.

In theory this should work, as there is only one user that has this login and password, so the result should be one?

#2 DarkHavn

DarkHavn
  • Members
  • PipPipPip
  • Advanced Member
  • 69 posts

Posted 22 August 2006 - 03:21 AM

Nevermind fixed it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users