Re: SELECT statement

From: Date: Tue, 13 Feb 2001 05:39:14 +0000
Subject: Re: SELECT statement
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39355@lists.php.net to get a copy of this message
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

« previous php.general (#39355) next »