Jump to content

[SOLVED] MySQL retrieval and creation


hyeteck

Recommended Posts

hey guys..is the following code legal?  I don't think its working for me

 

$cat_id = mysql_query("SELECT `sectionID` from `sections` WHERE `sectionName`='$cat_segment', 'topSection'!='0' ");
							if($cat_id==NULL)
							{
								$temp = mysql_query("INSERT INTO `sections`(sectionName, sectionWorkingName, topSection, rootSection) VALUES('$cat_segment', '$cat_segment', '0', '0')");
							}

 

do i have to do something to extract the data from $cat_id or will it automatically just return the data from the database into the $cat_id as a string?

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/38930-solved-mysql-retrieval-and-creation/
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.