ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:createsequence

Differences

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

Link to this comparison view

Next revision
Previous revision
reference:createsequence [2015/07/24 21:51] – created mnewnhamv5:reference:connection:createsequence [2016/01/17 00:45] (current) – ↷ Page moved from v5:reference:createsequence to v5:reference:connection:createsequence mnewnham
Line 3: Line 3:
 <WRAP right box> <WRAP right box>
 == See Also == == See Also ==
-[[database:feature_comparison|Feature Comparison Matrix]]+[[v5:database:feature_comparison|Feature Comparison Matrix]]
 == Syntax == == Syntax ==
   bool createSequence(   bool createSequence(
Line 13: Line 13:
 ===== Description ===== ===== Description =====
 The function ''createSequence()'' creates an auto-incrementing number device. If the database supports it, it uses native sequence handling routines, otherwise it emulates the functionality using a table and an auto-incrementing numbers. The function ''createSequence()'' creates an auto-incrementing number device. If the database supports it, it uses native sequence handling routines, otherwise it emulates the functionality using a table and an auto-incrementing numbers.
 +
 +Once created, numbers can retrieved using [[v5:reference:genid|genId()]].
 +----------------------------------------
 ===== Usage ===== ===== Usage =====
 <code php> <code php>
 /* /*
  * Connection assumed  * Connection assumed
 + */
 +
 +/*
 + * Create a sequence called my_sequence, using default start of 1
  */  */
 $db->createSequence('my_sequence'); $db->createSequence('my_sequence');
 </code> </code>
v5/reference/connection/createsequence.1437767519.txt.gz · Last modified: 2017/04/21 11:36 (external edit)