PHP with Access -- I know, I know, but its development

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
ericsodt
Forum Commoner
Posts: 51
Joined: Fri Aug 22, 2003 12:12 pm
Location: VA

PHP with Access -- I know, I know, but its development

Post by ericsodt »

I have a select statement:
$query="select f_name, password from user_t where email = ' ".$email." ' ";

Once executed I run the 'isset' function to make sure it has been executed. Now How do I know how many rows are returned?? Cause if the passwords arent equal (from the query and what the user has entered) then I want to display 'invalid password' HOWEVER, if the f_name doesnt exists with the specified email, then I want to alert the user that the user name doesnt exist. what other functions can I uses to check that... keep in mind I am using access for the time being.

Thanks
fractalvibes
Forum Contributor
Posts: 335
Joined: Thu Sep 26, 2002 6:14 pm
Location: Waco, Texas

Post by fractalvibes »

Assuming you are using the ODBC object, just use the odbc_num_rows function - check the php manual for syntax.
Should return how many rows are in the recordset.

fv
Post Reply