API17:JDatabase::setQuery
From Joomla! Documentation
(Difference between revisions)
(Layout updates) |
(Updated to r1448:247ba8d88526) |
||
| Line 2: | Line 2: | ||
=={{JVer|11.1}} JDatabase::setQuery== | =={{JVer|11.1}} JDatabase::setQuery== | ||
===Description=== | ===Description=== | ||
| − | Sets the SQL | + | Sets the SQL statement string for later execution. |
{{Description:JDatabase::setQuery}} | {{Description:JDatabase::setQuery}} | ||
| Line 8: | Line 8: | ||
<nowiki>[</nowiki>[[Description:JDatabase::setQuery|Edit Descripton]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[Description:JDatabase::setQuery|Edit Descripton]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | |||
<source lang="php"> | <source lang="php"> | ||
| − | public | + | public function setQuery ( |
| + | $query | ||
| + | $offset=0 | ||
| + | $limit=0 | ||
| + | ) | ||
</source> | </source> | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 20: | Line 23: | ||
|- | |- | ||
|$query | |$query | ||
| + | |mixed | ||
| | | | ||
| − | | | + | |The SQL statement to set either as a object or a string. |
| − | + | ||
|- | |- | ||
|$offset | |$offset | ||
| − | | | + | |integer |
|0 | |0 | ||
| − | | | + | |The affected row offset to set. |
|- | |- | ||
|$limit | |$limit | ||
| − | | | + | |integer |
|0 | |0 | ||
| − | | | + | |The maximum affected rows to set. |
|- | |- | ||
|} | |} | ||
| − | + | * '''Returns''' This object to support method chaining. | |
| − | + | * '''Defined''' on line 936 of libraries/joomla/database/database.php | |
| − | + | * '''Since''' {{JVer|11.1 }} | |
| − | libraries/joomla/database/database.php | + | |
| − | * | + | |
| − | + | ||
===See also=== | ===See also=== | ||
| + | * {{JVer|11.1}} '''JDatabase::setQuery source code''' on [[jplatform:database/database.php#cl-928|BitBucket]] | ||
| + | * {{JVer|11.1}} Class [[JDatabase/11.1|JDatabase]] | ||
| + | * {{JVer|11.1}} Subpackage [[Subpackage_Database/11.1|Database]] | ||
| + | * [[JDatabase::setQuery|Other versions of JDatabase::setQuery]] | ||
| + | {{SeeAlso:JDatabase::setQuery}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[SeeAlso:JDatabase::setQuery|Edit See Also]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[SeeAlso:JDatabase::setQuery|Edit See Also]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | + | ===User contributed notes=== | |
| − | + | ||
| − | + | ||
| − | === | + | |
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
<dpl> | <dpl> | ||
| Line 56: | Line 58: | ||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
| + | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
<noinclude>[[Category:JDatabase]][[Category:JDatabase::setQuery]]</noinclude> | <noinclude>[[Category:JDatabase]][[Category:JDatabase::setQuery]]</noinclude> | ||
Revision as of 20:27, 27 April 2011
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
JDatabase::setQuery
Description
Sets the SQL statement string for later execution.
Description:JDatabase::setQuery [Edit Descripton]
public function setQuery ( $query $offset=0 $limit=0 )
| Parameter | Type | Default | Description |
|---|---|---|---|
| $query | mixed | The SQL statement to set either as a object or a string. | |
| $offset | integer | 0 | The affected row offset to set. |
| $limit | integer | 0 | The maximum affected rows to set. |
- Returns This object to support method chaining.
- Defined on line 936 of libraries/joomla/database/database.php
- Since
See also
-
JDatabase::setQuery source code on BitBucket
-
Class JDatabase
-
Subpackage Database
- Other versions of JDatabase::setQuery
SeeAlso:JDatabase::setQuery [Edit See Also]
User contributed notes
<CodeExamplesForm />
