IF ..THEN

From: Date: Tue, 06 Nov 2001 21:27:37 +0000
Subject: IF ..THEN
Groups: php.db 
Request: Send a blank email to php-db+get-14074@lists.php.net to get a copy of this message
Is it possible in SQL to look into two different tables depending on the data? For example: Name Attribute X S.Black Y S.Blue Z T.White W T.Red can i do something like this? IF Attribute=S.(something) THEN look into Table 1 and return col1 else look into Table2 and return col2. I am using S. and T. as substring to separate the data.I guess then when I will display it , i have to parse it to. Any hint? thanks ) (( |""|-. | :|/' -`--'-

« previous php.db (#14074) next »