Trong một cơ sở dữ liệu MySQL Tôi có một trường datetime được lưu trữ như thế này:laravel được microtime từ cơ sở dữ liệu
2015-05-12 13:58:25.000508
Nhưng khi tôi thực hiện truy vấn này, ví dụ:
$query = SdkEvent::with('sdkEventStack');
if (isset($params['CO_ID']) && $params['CO_ID'] != "") {
$query->where('CO_ID', $params['CO_ID']);
}
if (isset($params['APP_ID']) && $params['APP_ID'] != "") {
$query->where('APP_ID', $params['APP_ID']);
}
if (isset($params['app_ip']) && $params['app_ip'] != "") {
$query->where('SDKEVENT_IP', 'LIKE', $params['app_ip'].'%');
}
if (isset($params['PLACE_ID']) && $params['PLACE_ID'] != "") {
$query->where('PLACEMENT_ID', $params['PLACE_ID']);
}
$sdks = $query->get();
tôi nhận được datetime như thế này: 2015-05-12 13:58:25
Tại sao tôi không nhận được micro giây?
Loại dữ liệu nào bạn lưu trữ trong MySQL? – Pitchinnate