JDatabase/quote: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
| Line 44: | Line 44: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=quote | category=quote | ||
category=JDatabase | category=JDatabase | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Latest revision as of 01:27, 25 March 2017
Description
Get a quoted database escaped string
<! removed transcluded page call, red link never existed >
Syntax
quote($text, $escaped=true)
| Parameter Name | Default Value | Description |
|---|---|---|
| $text | A string | |
| $escaped | true | Default true to escape string, false to leave the string unchanged |
Returns
string
Defined in
libraries/joomla/database/database.php
Importing
jimport( 'joomla.database.database' );
Source Body
public function quote($text, $escaped = true)
{
return '\''.($escaped ? $this->getEscaped($text) : $text).'\'';
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples