$query = "SELECT User.* FROM User,Owner WHERE email_login=$login_name && password=PASSWORD($password) && activeuser=\"Y\" "; $result = mysql($query) or die("Error: ".mysql_error()); if( mysql_num_rows($result) != 1 ) { ...not an active/valid user ... }
-----Original Message----- From: Steve Osborne [mailto:[EMAIL PROTECTED]] Sent: Friday, December 07, 2001 3:27 PM To: MySQL (E-mail) Subject: Query question I am trying to validate a user in a login form. There are 3 things that must be true. User login name = email_login (from User table) User password = password (from User Table) User must be active: activeuser (from Owner table) = 'Y' I don't know why I'm having so much difficulty with this SQL statement, but can anyone help? Steve --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php