Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $schemas = [
- new \MssqlSchema(App()->db),
- new \PgsqlSchema(App()->db),
- new \MysqlSchema(App()->db),
- ];
- $tests = [
- 'string(11)',
- 'string (11)',
- 'string',
- 'integer(4)',
- 'integer (4)',
- 'integer',
- 'decimal(10,40)',
- 'decimal (10,40)',
- 'decimal',
- 'float(10,40)'
- ];
- echo \CHtml::openTag('table');
- echo "<tr>";
- echo \CHtml::tag('th', [], ' ');
- foreach($schemas as $schema) {
- echo \CHtml::tag('th', [], get_class($schema));
- }
- echo "</tr>";
- foreach($tests as $test) {
- echo "<tr>";
- echo \CHtml::tag('th', [], $test);
- foreach($schemas as $schema) {
- echo \CHtml::tag('td', [], $schema->getColumnType($test));
- }
- echo "</tr>";
- }
- echo \CHtml::closeTag('table');
- die();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement