First shot at an actual working form to enter contact information. It only handles phone numbers at the moment, and it does NOT handle existing ones. It's a decent start though, and worth checking in. Next I'll have to handle existing phone numbers, and then addresses and emails. Of course, after that, I'll have to actually save everything to the database.
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@209 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -47,13 +47,15 @@ class AppModel extends Model {
|
||||
*
|
||||
* Gets the enum values for MySQL 4 and 5 to use in selectTag()
|
||||
*/
|
||||
function getEnumValues($columnName=null, $respectDefault=false)
|
||||
function getEnumValues($columnName=null, $tableName=null)
|
||||
{
|
||||
if ($columnName==null) { return array(); } //no field specified
|
||||
|
||||
//Get the name of the table
|
||||
$db =& ConnectionManager::getDataSource($this->useDbConfig);
|
||||
$tableName = $db->fullTableName($this, false);
|
||||
if (!isset($tableName)) {
|
||||
//Get the name of the table
|
||||
$db =& ConnectionManager::getDataSource($this->useDbConfig);
|
||||
$tableName = $db->fullTableName($this, false);
|
||||
}
|
||||
|
||||
//Get the values for the specified column (database and version specific, needs testing)
|
||||
$result = $this->query("SHOW COLUMNS FROM {$tableName} LIKE '{$columnName}'");
|
||||
|
||||
Reference in New Issue
Block a user