references:joomla.framework:database:jdatabase-setquerysetQuery
Sets the SQL query string for later execution. This function also replaces all occurrences within the query string of a given string identifier with the current database table prefix code. Note that this function does not cause the SQL query to be executed. Syntaxvoid setQuery ( $sql, $offset, $limit, $prefix )
ExamplesExample $database =& JFactory::getDBO(); $sql = 'SELECT * FROM #__categories'; $database->setQuery( $sql ); $rows = $database->loadObjectList(); foreach ( $rows as $row ) { echo "$row->title: $row->description\n"; } might produce: Result Latest: The latest news from the Joomla! Team Joomla! Specific Links: A selection of links that are all related to the Joomla! Project. Newsflash: Joomla!: Business: general: Existing Users: Here you will find an example set of FAQs. Linux: Internet: Contacts: Contact Details for this website Joomla: Text Ads: Features: Benefits: Platforms: Other Resources: test555: The CMS: Information about the software behind Joomla!<br /> Current Users: Questions that users migrating to Joomla! 1.5 are likely to raise<br /> The Project: General facts about Joomla!<br /> New to Joomla: Questions for new users of Joomla!<br /> The Community: About the millions of Joomla! users and websites<br /> General: General questions about the Joomla! CMS Languages: Questions related to localisation and languages Discussion |


