< DATE: Literal Data Type   (Previous) Table of Contents (Next)   DATE: Getting Literal Data Type >

DATE: Setting Literal Data 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 setDateLiteralType() {
    switch ($this->phptype . ':' . $this->dbsyntax) {
        case 'fbsql:fbsql':
        case 'oci8:oci8':
            $this->DateLiteralType = ' DATE ';
            break;
        case 'ibase:firebird':
        case 'mssql:mssql':
        case 'mysql:mysql':
        case 'mysqli:mysqli':
        case 'odbc:access':
        case 'odbc:db2':
        case 'pgsql:pgsql':
        case 'sqlite:sqlite':
        case 'sybase:sybase':
            $this->DateLiteralType = ' ';
            break;
        default:
            $this->DateLiteralType = false;
            die('unknown phptype/dbsyntax in setDateLiteralType()');
    }
    return true;
}