Page 1 of 1

[SOLVED] - Trouble with SELECT statement

Posted: Wed Mar 21, 2007 9:03 pm
by iknownothing
Hey Guys,
I have a select statement that is about as difficult as I have done to date. It all worked fine until I added the client table in there, now it all works bar the 'domainexp', I think I may have worded the SELECT incorrectly, can anyone give any pointers?

Thanks.

Code: Select all

$showwebtwo = MYSQL_QUERY("SELECT *, clients.clientname FROM web, clients WHERE domainexp BETWEEN '$from' AND '$to' AND web.clientid=clients.id");

Posted: Wed Mar 21, 2007 9:34 pm
by John Cartwright
you need to reference the table name for `domainexp` in the WHERE clause

Posted: Wed Mar 21, 2007 10:00 pm
by iknownothing
Sorry Guys, it was a missing ECHO the whole time...

thanks for the help anyway.