我想知道是否存在比这更短的表达式:
'0000-00-00 00:00:00'
SELECT id FROM orders WHERE posted='0000-00-00 00:00:00' ORDER BY id DESC LIMIT 1;
我的意思是:
SELECT id FROM orders WHERE posted=null ORDER BY id DESC LIMIT 1;
我希望这是您想要看到的架构:
array(19) {
["TABLE_CATALOG"]=>
NULL
["TABLE_SCHEMA"]=>
string(13) "teleprintfejl"
["TABLE_NAME"]=>
string(13) "megrendelesek"
["COLUMN_NAME"]=>
string(7) "posted"
["ORDINAL_POSITION"]=>
string(2) "20"
["COLUMN_DEFAULT"]=>
NULL
["IS_NULLABLE"]=>
string(2) "NO"
["DATA_TYPE"]=>
string(8) "datetime"
["CHARACTER_MAXIMUM_LENGTH"]=>
NULL
["CHARACTER_OCTET_LENGTH"]=>
NULL
["NUMERIC_PRECISION"]=>
NULL
["NUMERIC_SCALE"]=>
NULL
["CHARACTER_SET_NAME"]=>
NULL
["COLLATION_NAME"]=>
NULL
["COLUMN_TYPE"]=>
string(8) "datetime"
["COLUMN_KEY"]=>
string(0) ""
["EXTRA"]=>
string(0) ""
["PRIVILEGES"]=>
string(31) "select,insert,update,references"
["COLUMN_COMMENT"]=>
string(0) ""
}