Jump to content

[SOLVED] using join


knowram

Recommended Posts

I have 3 tables a, b, and c. I know what is in table a and I want the related info from table b and a. Is there some what to do that in one query?

 

Some thing like

$result = mssql_query("select c.info from c and b.get from b
					JOIN b
					ON c.index = b.index 
					JOIN a 
					ON b.index2 = a.index
						WHERE a.get = '12115'") or
				die ("Can't get info");

while ($aDevice = mssql_fetch_array($result, MSSQL_ASSOC)){
	echo'<pre>';
	print_r($aDevice);
	echo'</pre>';
}

 

that probably doesn't make any sense but I hope someone gets the idea.

 

Thanks for the help

 

Link to comment
https://forums.phpfreaks.com/topic/72109-solved-using-join/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.