Oops, sorry missed the fact that it's two different tables. Try this...
$result=mysql_db_query("database_name", " Select user.email_login,
user.password, owner.activeuser from user, owner where email_login like
'$name' and password like '$password' and user.nameid like owner.nameid;");
$numrows=mysql_affected_rows();
$data = mysql_fetch_array($result);
if(($numrows=1)&&($data[owner.activeuser]=='Y')){
login_script
}
Jason
> -----Original Message-----
> From: Michael, Jason
> Sent: Friday, December 07, 2001 3:50 PM
> To: 'Steve Osborne'
> Subject: RE: Query question
>
> Try this...
>
> $result=mysql_db_query("database_name", " Select * from table_name where
> email_login like 'name' and password like 'password';");
> $numrows=mysql_affected_rows();
> $data = mysql_fetch_array($result);
> if(($numrows=1)&&($data[activeuser]=='Y')){
> login_script
> }
>
> Jason
>
> -----Original Message-----
> From: Steve Osborne [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, December 07, 2001 4: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