Posted by Brian on 05/20/06 17:13
I'm not sure if this can be done, but I would like to turn 2 statements in
to 1
The 1st one returns 2 fields "Bank" and "Advertmode"
SELECT bank1, advertmode1 FROM conf WHERE (id = "XYZ")
The 2nd one uses the "Bank" field to know what to get and the "Advertmode"
is used to set a flag
SELECT * FROM profiles WHERE (customer = "TheCustomers") AND (profile_name1
= "Bank1")
I need to end up with 4 fields that I can use
filename1 (from profiles table)
description1 (from profiles table)
supplier1 (from profiles table)
advertmode1 (from conf table)
This statement will be run 14 times to gather the fields 1 to 14 (eg
filename1, filename2, filename3 etc) so I am trying to make it quicker to
run
Can this be done?
Brian
[Back to original message]
|