PDA

View Full Version : Double WHERE in a select statement


Pieterman
05-21-2005, 11:20 AM
hey having a bit of trouble wit my SELECT statement because i can't two WHERE statements to works Can anyone help
int uu = 3;
String code = "SELECT * FROM destinations INNER JOIN holidayType ON holidayType.holidayID = destinations.holidayID WHERE holidayType.star = uu && holidayType.season = '" + line + "'";

SHot
Piet

squirellplaying
05-21-2005, 08:36 PM
My statements look like this:

"SELECT * FROM people WHERE fname = '$fname' AND lname = '$lname';"

I believe the "&&" should be changed to "AND".

Pieterman
05-22-2005, 02:59 PM
thanks that should help