JDatabase::quote: Difference between revisions
From Joomla! Documentation
m →See also: moving preparation |
m clean up |
||
| Line 4: | Line 4: | ||
Method to quote and optionally escape a string to database requirements for insertion into the database. | Method to quote and optionally escape a string to database requirements for insertion into the database. | ||
{{Description:JDatabase::quote}} | {{subst:Description:JDatabase::quote}} | ||
<source lang="php"> | <source lang="php"> | ||
public function quote ( | public function quote ( | ||
| Line 40: | Line 38: | ||
* {{JVer|11.1}} Subpackage [[API17:Subpackage_Database|Database]] | * {{JVer|11.1}} Subpackage [[API17:Subpackage_Database|Database]] | ||
* [[API17:JDatabase::quote|Other versions of JDatabase::quote]] | * [[API17:JDatabase::quote|Other versions of JDatabase::quote]] | ||
{{SeeAlso:JDatabase::quote}} | {{subst:SeeAlso:JDatabase::quote}} | ||
===User contributed notes=== | ===User contributed notes=== | ||
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
Revision as of 15:00, 24 March 2017
JDatabase::quote
Description
Method to quote and optionally escape a string to database requirements for insertion into the database.
{{subst:Description:JDatabase::quote}}
public function quote (
$text
$escape=true
)
| Parameter | Type | Default | Description |
|---|---|---|---|
| $text | string | The string to quote. | |
| $escape | bool | true | True to escape the string, false to leave it unchanged. |
- Returns string The quoted input string.
- Defined on line 903 of libraries/joomla/database/database.php
- Since

See also
JDatabase::quote source code on BitBucket
Class JDatabase
Subpackage Database- Other versions of JDatabase::quote
{{subst:SeeAlso:JDatabase::quote}}
User contributed notes
<CodeExamplesForm />