Changeset 353 for trunk/Model.php
- Timestamp:
- Jan 18, 2012, 8:48:26 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Model.php
r343 r353 1 1 <?php 2 2 3 define('PropertyDate', 'Date'); 4 define('PropertyTime', 'Time'); 3 5 define('PropertyDateTime', 'DateTime'); 4 6 define('PropertyText', 'Text'); … … 32 34 { 33 35 $this->Properties[] = array('Name' => $Name, 'Type' => PropertyDateTime); 36 } 37 38 function AddPropertyDate($Name) 39 { 40 $this->Properties[] = array('Name' => $Name, 'Type' => PropertyDate); 41 } 42 43 function AddPropertyTime($Name) 44 { 45 $this->Properties[] = array('Name' => $Name, 'Type' => PropertyTime); 34 46 } 35 47 … … 85 97 if($Property['Type'] == PropertyDateTime) 86 98 $Query .= '`'.$Property['Name'].'` DATETIME NOT NULL,'; 99 else if($Property['Type'] == PropertyDate) 100 $Query .= '`'.$Property['Name'].'` DATE NOT NULL,'; 101 else if($Property['Type'] == PropertyTime) 102 $Query .= '`'.$Property['Name'].'` TIME NOT NULL,'; 87 103 else if($Property['Type'] == PropertyString) 88 104 $Query .= '`'.$Property['Name'].'` VARCHAR(255) COLLATE utf8_general_ci NOT NULL,'; … … 90 106 $Query .= '`'.$Property['Name'].'` TEXT COLLATE utf8_general_ci NOT NULL,'; 91 107 else if($Property['Type'] == PropertyInteger) 108 $Query .= '`'.$Property['Name'].'` INT(11) NOT NULL,'; 109 else if($Property['Type'] == PropertyBoolean) 92 110 $Query .= '`'.$Property['Name'].'` INT(11) NOT NULL,'; 93 111 else if($Property['Type'] == PropertyFloat)
Note:
See TracChangeset
for help on using the changeset viewer.