On Tue, 13 Feb 2001 16:00, Peter Houchin wrote:

> > Hi,
>
> Can you have a SELECT statement (using mysql) that goes something like
>
> $sql="SELECT id && email FROM table WHERE user='$user' and
> pass='$pass'";
>
> and if you can't is there a away around this?
>
> Thanks
>
> Peter

In SQL queries, you normally separate the required fields with a comma, so

$sql="SELECT id, email FROM table WHERE user='$user' and pass='$pass'";

would work, assuming id and email are fields in the table 'table'.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to