| joomla query to get sectionid trying to get something in content.php |
David_M

msg:3410155 | 5:06 am on Aug 1, 2007 (gmt 0) | I'm trying to get the sectionid when the file content.php runs (com_content) in joomla 1.0x. $uid=$id; $query = "SELECT *" . "\n FROM #__content" . "\n WHERE id = " . (int) $uid ; $database->setQuery( $query ); $row = NULL; $row = $database->loadObjectList(); $mysectionid =$row->sectionid; Any ideas why its not giving me the sectionid?
|
Habtom

msg:3410169 | 6:04 am on Aug 1, 2007 (gmt 0) | Try echoing your query echo $query; and see if you have got the query right. Perhaps that will give you a hint if there is a problem with the query.
|
David_M

msg:3411076 | 1:06 am on Aug 2, 2007 (gmt 0) | Got it. $query = 'SELECT sectionid FROM #__content WHERE id = ' . $id; $database->setQuery( $query ); $mysectionid = $database->loadResult();
|
|
|