Actions

API17

Difference between revisions of "JDatabase::insertid"

From Joomla! Documentation

(Layout updates)
(Updated to r1448:247ba8d88526)
Line 2: Line 2:
 
=={{JVer|11.1}} JDatabase::insertid==
 
=={{JVer|11.1}} JDatabase::insertid==
 
===Description===
 
===Description===
Get the ID generated from the previous INSERT operation.  
+
Method to get the auto-incremented value from the last INSERT statement.  
  
 
{{Description:JDatabase::insertid}}
 
{{Description:JDatabase::insertid}}
Line 8: Line 8:
 
<nowiki>[</nowiki>[[Description:JDatabase::insertid|Edit Descripton]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[Description:JDatabase::insertid|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
</span>
===Synopsis===
 
 
<source lang="php">
 
<source lang="php">
public JDatabase::insertid ()
+
public function insertid ()
 
</source>
 
</source>
===Returns===
+
* '''Returns''' integer The value of the auto-increment field from the last inserted row.
mixed
+
* '''Defined''' on line 1238 of libraries/joomla/database/database.php
===Defined in===
+
* '''Since''' {{JVer|11.1 }}
libraries/joomla/database/database.php (line 765)
+
* see source code in [[jplatform:database/database.php#cl-765|BitBucket]]
+
===Referenced by===
+
 
===See also===
 
===See also===
 +
* {{JVer|11.1}} '''JDatabase::insertid source code''' on [[jplatform:database/database.php#cl-1230|BitBucket]]
 +
* {{JVer|11.1}} Class [[JDatabase/11.1|JDatabase]]
 +
* {{JVer|11.1}} Subpackage [[Subpackage_Database/11.1|Database]]
 +
* [[JDatabase::insertid|Other versions of JDatabase::insertid]]
 +
{{SeeAlso:JDatabase::insertid}}
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JDatabase::insertid|Edit See Also]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[SeeAlso:JDatabase::insertid|Edit See Also]]<nowiki>]</nowiki>
 
</span>
 
</span>
* [[JDatabase/11.1|JDatabase]]
+
===User contributed notes===
* [[JDatabase::insertid|Other versions of this method]]
+
{{SeeAlso:JDatabase::insertid}}
+
===Examples===
+
 
<CodeExamplesForm />
 
<CodeExamplesForm />
 
<dpl>
 
<dpl>
Line 33: Line 31:
 
category=MethodExample
 
category=MethodExample
 
include=*
 
include=*
 +
namespace=CodeExample
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
 
<noinclude>[[Category:JDatabase]][[Category:JDatabase::insertid]]</noinclude>
 
<noinclude>[[Category:JDatabase]][[Category:JDatabase::insertid]]</noinclude>

Revision as of 19:26, 27 April 2011