TwistPHP Documentation

primaryKey

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

primaryKeySet a field to be a primary key

Parameters

Name Type Description
$strFieldstringn/a

Return Values

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

Example

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

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