Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
Martin Konecny 2011-10-24 16:59:16 -04:00
commit 04b88d4344
3 changed files with 50 additions and 29 deletions

View file

@ -1358,4 +1358,19 @@ class Application_Model_Show {
return $CC_DBC->GetAll($sql);
}
public static function GetMaxLengths() {
global $CC_CONFIG, $CC_DBC;
$sql = "SELECT column_name, character_maximum_length FROM information_schema.columns"
." WHERE table_name = 'cc_show' AND character_maximum_length > 0";
$result = $CC_DBC->GetAll($sql);
// store result into assoc array
$assocArray = array();
foreach($result as $row) {
$assocArray[$row['column_name']] = $row['character_maximum_length'];
}
return $assocArray;
}
}