Jump to content

[SOLVED] should this work?


blueman378

Recommended Posts

hi guys,

 

im trying to do something, i only need the last result, so should this work?

 

$query = mysql_query("SELECT * FROM sub_categories WHERE id='$products[cid]'") or die(mysql_error());
			$result = mysql_query($query);
			$row = mysql_fetch_assoc($result);
			$subcat = $row[Name];

$query = mysql_query("SELECT * FROM main_categories WHERE id='$row[mid]'") or die(mysql_error());
			$result = mysql_query($query);
			$row = mysql_fetch_assoc($result);
			$maincat = $row[Name];

		echo"<td valign=\"top\">$maincat >> $subcat</td>

 

obviously thats a snippet, i dont get any error or anything, jsut those values dont get filled

Link to comment
https://forums.phpfreaks.com/topic/108679-solved-should-this-work/
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.