ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:genid

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
v5:reference:genid [2016/01/13 02:31] – ↷ Links adapted because of a move operation mnewnhamv5:reference:connection:genid [2016/03/20 02:06] mnewnham
Line 8: Line 8:
 </WRAP> </WRAP>
 ===== Description ===== ===== Description =====
-The function ''genId()'' is a useful, portable way of generation sequence numbers. **This is not the same as having an auto-increment row on a table**. If the requested sequence name does not exist, it automatically calls [[v5:reference:createsequence|createSequence()]] to create it.It uses the best method available for a database, at best using the inbuilt sequencing functionality, and at the lowest end, maintaining a table with an integer field that is incremented using SQL syntax. +The function ''genId()'' is a useful, portable way of generation sequence numbers. **This is not the same as having an auto-increment row on a table**. If the requested sequence name does not exist, it automatically calls [[v5:reference:connection:createsequence|createSequence()]] to create it.It uses the best method available for a database, at best using the inbuilt sequencing functionality, and at the lowest end, maintaining a table with an integer field that is incremented using SQL syntax. 
  
 The optional parameters control the sequence name and the start number for the sequence. The return value is the sequence number. The optional parameters control the sequence name and the start number for the sequence. The return value is the sequence number.
Line 24: Line 24:
  */  */
 </code>  </code> 
 +===== Limitations =====
 +Because the method provides no row locking, its use is not recommended in intense multi-user environments. 
 +
  
v5/reference/connection/genid.txt · Last modified: 2016/03/20 02:11 by mnewnham