Created
February 17, 2012 17:44
-
-
Save flyx/1854562 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* concerts | |
*/ | |
class Concert extends ORMBase { | |
/** | |
* INT(10) | |
*/ | |
var $id = 5; | |
/** | |
* TEXT UNICODE | |
*/ | |
var $name = 'derp'; | |
public function __construct($row = NULL) { | |
parent::__construct($row); | |
} | |
} | |
// ... | |
$class = new Concert(); | |
echo $class->generateTableCreation(); | |
// CREATE TABLE `concerts` (`id` INT(10) auto_increment, | |
//`name` TEXT UNICODE, | |
// PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment