< DECIMAL   (Previous) Table of Contents (Next)   DECIMAL: Getting Column Type >

DECIMAL: Setting Column Type

/**
 * Sets the named property according to which DBMS is in use
 *
 * @return boolean  true if successful.  Does die() if the DBMS is unkown.
 */
function setDecimalType() {
    switch ($this->phptype . ':' . $this->dbsyntax) {
        case 'odbc:access':
            $this->DecimalType = ' NUMERIC ';
            break;
        case 'fbsql:fbsql':
        case 'ibase:firebird':
        case 'mssql:mssql':
        case 'mysql:mysql':
        case 'mysqli:mysqli':
        case 'oci8:oci8':
        case 'odbc:db2':
        case 'pgsql:pgsql':
        case 'sqlite:sqlite':
        case 'sybase:sybase':
            $this->DecimalType = ' DECIMAL\\1 ';
            break;
        default:
            $this->DecimalType = false;
            die('unknown phptype/dbsyntax in setDecimalType()');
    }
    return true;
}