references:joomla.framework:database:jdatabase-replaceprefixTable of Contents
replacePrefix
This function replaces a string identifier $prefix with the string held in the _table_prefix class variable. Syntaxvoid replacePrefix ( $sql, $prefix )
ExamplesExample $database =& JFactory::getDBO(); $sql = "SELECT * FROM #__content WHERE introtext=test"; echo $sql . '<br />'; $sql = $database->replacePrefix( $sql ); echo $sql; might produce: Result SELECT * FROM #__content WHERE introtext=test
SELECT * FROM jos_content WHERE introtext=test
Discussion |


