gehe zur Dokumentation dieser Datei
14 if (!defined(
'ADODB_DIR')) die();
26 $len = $fieldobj->max_length;
30 switch (strtoupper($t)) {
33 case 'INTEGER':
return 'I';
35 case 'TINYINT':
return 'I1';
36 case 'SMALLINT':
return 'I2';
37 case 'BIGINT':
return 'I8';
40 case 'FLOAT':
return 'F';
41 default:
return parent::MetaType($t,$len,$fieldobj);
47 switch(strtoupper($meta)) {
48 case 'C':
return 'VARCHAR';
50 case 'X':
return 'TEXT';
52 case 'C2':
return 'NVARCHAR';
53 case 'X2':
return 'NTEXT';
55 case 'B':
return 'IMAGE';
57 case 'D':
return 'DATETIME';
59 case 'T':
return 'DATETIME';
60 case 'L':
return 'BIT';
62 case 'I':
return 'INT';
63 case 'I1':
return 'TINYINT';
64 case 'I2':
return 'SMALLINT';
65 case 'I4':
return 'INT';
66 case 'I8':
return 'BIGINT';
68 case 'F':
return 'REAL';
69 case 'N':
return 'NUMERIC';
81 $s =
"ALTER TABLE $tabname $this->addCol";
82 foreach($lines as $v) {
85 $s .= implode(
', ',$f);
95 foreach($lines as $v) {
96 $sql[] =
"ALTER TABLE $tabname $this->alterCol $v";
105 if (!is_array($flds)) $flds = explode(
',',$flds);
107 $s =
"ALTER TABLE $tabname";
108 foreach($flds as $v) {
109 $f[] =
"\n$this->dropCol ".$this->NameQuote($v);
111 $s .= implode(
', ',$f);
117 function _CreateSuffix($fname,&$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
120 if (strlen($fdefault)) $suffix .=
" DEFAULT $fdefault";
121 if ($fautoinc) $suffix .=
' DEFAULT AUTOINCREMENT';
122 if ($fnotnull) $suffix .=
' NOT NULL';
123 else if ($suffix ==
'') $suffix .=
' NULL';
124 if ($fconstraint) $suffix .=
' '.$fconstraint;
200 function _IndexSQL($idxname, $tabname, $flds, $idxoptions)
204 if ( isset($idxoptions[
'REPLACE']) || isset($idxoptions[
'DROP']) ) {
205 $sql[] = sprintf ($this->dropIndex, $idxname, $tabname);
206 if ( isset($idxoptions[
'DROP']) )
210 if ( empty ($flds) ) {
214 $unique = isset($idxoptions[
'UNIQUE']) ?
' UNIQUE' :
'';
215 $clustered = isset($idxoptions[
'CLUSTERED']) ?
' CLUSTERED' :
'';
217 if ( is_array($flds) )
218 $flds = implode(
', ',$flds);
219 $s =
'CREATE' . $unique . $clustered .
' INDEX ' . $idxname .
' ON ' . $tabname .
' (' . $flds .
')';
221 if ( isset($idxoptions[$this->upperName]) )
222 $s .= $idxoptions[$this->upperName];
Sie sind hier: Home » MyOOS Benutzerhandbuch » ADOdb
Korrekturen, Hinweise und Ergänzungen
Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag
Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.