PDA

View Full Version : Using joined table question


jeddi
08-03-2009, 06:24 AM
Hi,

I an using joined tables in my query and I would like to get all the fields
from the first table but only a few specific ones from the other table.

Can I use a wild card on just one table like this :


$sql = "SELECT hits.*, clients.cl_name,clients.cl_email FROM hits,clients where hits.confirm = 'y' AND hits.client = clients.client_id";

Thanks for any advice :)

Old Pedant
08-03-2009, 06:55 AM
Not to ask a dumbass question, but... WHY didn't you just *try* it instead of waiting around for who knows how long for an answer?????

Oh, and the answer is "Yes."