====== replacePrefix ======
{#JAPI Joomla.Framework Database JDatabase::replacePrefix #}
This function replaces a string identifier $prefix with the string held in the _table_prefix class variable.
===== Syntax =====
void replacePrefix ( **$sql**, **$prefix** )
| **$sql** | string | is a string containing the SQL query. |
| **$prefix** | string | is a string containing the common table prefix. This parameter is optional and if omitted defaults to '#__'. |
===== Examples =====
$database =& JFactory::getDBO();
$sql = "SELECT * FROM #__content WHERE introtext=test";
echo $sql . '
';
$sql = $database->replacePrefix( $sql );
echo $sql;
might produce:
SELECT * FROM #__content WHERE introtext=test
SELECT * FROM jos_content WHERE introtext=test
----
~~DISCUSSION~~