Skip to content

Instantly share code, notes, and snippets.

@kriswallsmith
Created July 22, 2009 16:35
Show Gist options
  • Save kriswallsmith/152120 to your computer and use it in GitHub Desktop.
Save kriswallsmith/152120 to your computer and use it in GitHub Desktop.
<?php
// Doctrine/DataDict/Mysql.php
if ($length <= 1) {
return 'TINYINT';
} elseif ($length == 2) {
return 'SMALLINT';
} elseif ($length == 3) {
return 'MEDIUMINT';
} elseif ($length == 4) {
return 'INT';
} elseif ($length > 4) {
return 'BIGINT';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment