having a hard time wrapping my head around this concept. I know that I cant store the information into my index schema array with the table as the key now that I think of it. Because it would just rewrite the information each iteration of the key. Anyone have a suggestion? I know I could always just put it down as individual entries but I was just trying to do something that was easier to read with less code.
$idxschema[$helpdeskticketstable] = ticket_statusid => '$helpdeskticketscolumn[ticket_statusid]';
$idxschema[$helpdeskticketstable] = ticket_typeid => '$helpdeskticketscolumn[ticket_typeid]';
$idxschema[$helpdeskticketstable] = ticket_priorityid => '$helpdeskticketscolumn[ticket_priorityid]';
$idxschema[$helpdeskticketstable] = ticket_openedby => '$helpdeskticketscolumn[ticket_openedby]';
$idxschema[$helpdeskticketstable] = ticket_assignedto => '$helpdeskticketscolumn[ticket_assignedto]';
$idxschema[$helpdeskhistoriestable] = ticket_id => '$helpdeskhistoriescolumn[ticket_id]';
$idxschema[$helpdeskhistoriestable] = history_updatedby => '$helpdeskhistoriescolumn[history_updatedby]';
////////////////////////////////////////////////////////////////////////////////////////////
foreach ($idxschema as $table => $idxflds => $idxname) {
// Define the name of the index
// Define columns with index
$sqlarray = $dict->CreateIndexSQL($idxname, $table, $idxflds);
// Check for an error with the database code, and if so set an
// appropriate error message and return
if ($dict->ExecuteSQLArray($sqlarray) != 2) {
pnSessionSetVar('errormsg', _HELPDESKCREATEINDEXFAILED);
return false;
}
}