====== Quote ====== {#JAPI Joomla.Framework Database JDatabase::Quote #} ADODB Compatibility function. See [[http://phplens.com/adodb/reference.functions.quote.html]] for more information. Returns a quoted string with all characters that have special meaning for the database escaped. This function is the same as database->getEscaped except that the string returned is surrounded by single quotes. ===== Syntax ===== string Quote ( **$text** ) | **$text** | string | is a string to be quoted. | ===== Examples ===== $database =& JFactory::getDBO(); $text = $database->Quote( "Joomla! is 'Power in Simplicity'!" ); $sql = "SELECT * FROM #__content WHERE introtext=$text"; $database->setQuery( $sql ); if (!$database->query()) { echo $database->stderr(); } echo $database->getQuery(); might produce: SELECT * FROM jos_content WHERE introtext='Joomla! is \'Power in Simplicity\'!' ---- ~~DISCUSSION~~