ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:dictionary:createindexsql

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
dictionary:createindexsql [2015/08/29 03:11] mnewnhamv5:dictionary:createindexsql [2016/01/13 02:06] (current) – ↷ Links adapted because of a move operation mnewnham
Line 14: Line 14:
  
  
-In order to actually create the column, the returned array must be passed to the [[dictionary:executeSqlArray|executeSqlArray()]] method. +In order to actually create the index, the returned array must be passed to the [[v5:dictionary:executesqlarray|executeSqlArray()]] method. 
  
 ===== Parameters ===== ===== Parameters =====
Line 28: Line 28:
 or as a numeric array: or as a numeric array:
 <code php> <code php>
-$fields = array('COLUMN_1','COLUMN_2',COLUMN_3');+$fields = array('COLUMN_1','COLUMN_2','COLUMN_3');
 </code> </code>
  
Line 37: Line 37:
 ===== Usage ===== ===== Usage =====
 <code php> <code php>
 +
 +$dict = NewDataDictionary($db);
 +$sqlarray = $dict->createIndexSql('SALESIDX','ACT', 'ACTMAXSALE,ACTNO');
 +print_r($sqlarray);
 +/*
 +* prints
 +*
 +Array
 +(
 +    [0] => CREATE INDEX SALESIDX ON ACT (ACTMAXSALE, ACTNO)
 +)
 +*/
 </code> </code>
  
v5/dictionary/createindexsql.1440810681.txt.gz · Last modified: 2017/04/21 11:28 (external edit)