Location: PHPKode > projects > QuickTicket > quickticket/quickticket/install/qti_setup_lang.inc
<?php

// QuickTicket 1.9.0.3 build:20081001

switch(substr($oDB->type,0,5))
{

case 'mysql':
  $strQ='CREATE TABLE '.$qti_prefix.'qtilang (
  objtype varchar(10),
  objlang varchar(2),
  objid varchar(24),
  objname varchar(4000),
  PRIMARY KEY (objtype,objlang,objid)
  )';
  break;

case 'mssql':
  $strQ='CREATE TABLE '.$qti_prefix.'qtilang (
  objtype varchar(10),
  objlang varchar(2),
  objid varchar(24),
  objname varchar(4000),
  CONSTRAINT pk_'.$qti_prefix.'qtilang PRIMARY KEY (objtype,objlang,objid)
  )';
  break;

case 'pg':
  $strQ='CREATE TABLE '.$qti_prefix.'qtilang (
  objtype varchar(10),
  objlang varchar(2),
  objid varchar(24),
  objname varchar(4000),
  PRIMARY KEY (objtype,objlang,objid)
  )';
  break;

case 'sqlit':
  $strQ='CREATE TABLE '.$qti_prefix.'qtilang (
  objtype text,
  objlang text,
  objid text,
  objname text,
  PRIMARY KEY (objtype,objlang,objid)
  )';
  break;

case 'ibase':
  $strQ='CREATE TABLE '.$qti_prefix.'qtilang (
  objtype varchar(10),
  objlang varchar(2),
  objid varchar(24),
  objname varchar(4000),
  PRIMARY KEY (objtype,objlang,objid)
  )';
  break;

case 'acces':
  $strQ='CREATE TABLE '.$qti_prefix.'qtilang (
  objtype varchar(10),
  objlang varchar(2),
  objid varchar(24),
  objname memo,
  CONSTRAINT pk_'.$qti_prefix.'qtilang PRIMARY KEY (objtype,objlang,objid)
  )';
  break;

case 'db2':
  $strQ='CREATE TABLE '.$qti_prefix.'qtilang (
  objtype varchar(10),
  objlang varchar(2),
  objid varchar(24),
  objname varchar(4000),
  PRIMARY KEY (objtype,objlang,objid)
  )';
  break;

case 'ifx':
  $strQ='CREATE TABLE '.$qti_prefix.'qtilang (
  objtype varchar(10),
  objlang varchar(2),
  objid varchar(24),
  objname varchar(4000),
  PRIMARY KEY (objtype,objlang,objid)
  )';
  break;

case 'oci':
  $strQ='CREATE TABLE '.$qti_prefix.'qtilang (
  objtype varchar2(10),
  objlang varchar2(2),
  objid varchar2(24),
  objname varchar2(4000),
  CONSTRAINT pk_'.$qti_prefix.'qtilang PRIMARY KEY (objtype,objlang,objid))';
  break;

default:
  die("Database type [{$oDB->type}] not supported... Must be mysql, mssql, pg, sqlite, firebird, db2, ifx or access");

}

echo '<span style="color:blue;">';
$b=$oDB->Query($strQ);
echo '</span>';

if ( !empty($oDB->error) || !$b )
{
  echo '<div class="div_setup_err">',sprintf ($L['E_install'],$qti_prefix.'qtilang',$qti_database,$qti_user),'</div>';
  echo '<br/><table cellspacing="0" class="ta_button"><tr><td></td><td class="td_button" style="width:120px">&nbsp;<a href="qti_setup_1.php">',$L['Restart'],'</a>&nbsp;</td></tr></table>';
  exit;
}

?>
Return current item: QuickTicket