TwistPHP Documentation

autoIncrement

File path: dist/twist/Core/Models/Database/TableStructure.model.php
Namespace: Twist\Core\Models\Database
Extends:

autoIncrementSet a field to be autoincrement

Parameters

Name Type Description
$strFieldstringn/a
[$intStartNumber = 1]integern/a

Return Values

void — No return information has been documented for this function.

Example

<?php
//Set the variables for the example
$strField 'foo';
$intStartNumber 1;

//Call the function autoIncrement with the example vars
$resTableStructure = new \Twist\Core\Models\Database\TableStructure();
$resTableStructure -> autoIncrement($strField$intStartNumber);