Thread: Scripting DIV's
View Single Post
Old 08-07-2006, 06:18 AM   #7 (permalink)
Slide
Limey Bastard
 
Join Date: Mar 2004
Location: London innit
Posts: 742
-3 Internets
Another question, this time SQL related.

Imagine a table (data_table):

[ row_id ] [ string_id1 ] [ string_id 2]

and another table (string_table):

[ string_id ] [ string_value ]

I want to write a query that subsitutes both string_id fields with the string values but can only figure out how to do the first one, ie:

SELECT string_table.string_value AS string_val1 FROM data_table, string_table WHERE data_table.string_id1 = string_table.string_id AND data_table.row_id = x;

Any way to get the second string value without a second SQL query?

Last edited by Slide : 08-07-2006 at 06:20 AM.
Slide is offline   Reply With Quote

 
Uberguilds Network