[SOLVED] - Trouble with SELECT statement

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
iknownothing
Forum Contributor
Posts: 337
Joined: Sun Dec 17, 2006 11:53 pm
Location: Sunshine Coast, Australia

[SOLVED] - Trouble with SELECT statement

Post 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");
Last edited by iknownothing on Wed Mar 21, 2007 10:06 pm, edited 1 time in total.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

you need to reference the table name for `domainexp` in the WHERE clause
User avatar
iknownothing
Forum Contributor
Posts: 337
Joined: Sun Dec 17, 2006 11:53 pm
Location: Sunshine Coast, Australia

Post by iknownothing »

Sorry Guys, it was a missing ECHO the whole time...

thanks for the help anyway.
Post Reply