JDatabaseQuery::quote
Method to quote and optionally escape a string to database requirements for insertion into the database.
This method is provided for use where the query object is passed to a function for modification. If you have direct access to the database object, it is recommended you use the quote method directly. Note that 'q' is an alias for this method as it is in JDatabaseDriver. Usage: $query->quote('fulltext'); $query->q('fulltext'); $query->q(array('option', 'fulltext'));
Signature
public function quote(mixed
$text,
[boolean
$escape = true] )
Parameters
-
$text
- A string or an array of strings to quote.
-
$escape
- True to escape the string, false to leave it unchanged.
Returns
- string
- The quoted input string.
Errors/Exceptions
-
RuntimeException
- if the internal db property is not a valid object.