is there any possibility to use the MySQL NOW() in the $wpdb->insert call?
When I use the following code, NOW() is not working.
$data = array(
'id' => NULL,
'order' => serialize($_POST['data']['Order']),
'created' => NOW(),
'user_id' => $current_user->ID
);
$wpdb->insert(ORDERS_TABLE, (array) $data );
I believe the canonical approach is to use the WordPress
current_time()function passing it ‘mysql’ as the first parameter to specify a mysql timestamp compatible format (the alternative is UNIX timestamp format) and ‘1’ as the second parameter to specify GMT time (default is local), like this:current_time('mysql', 1)outputs2012-07-18 12:51:13.More here: http://codex.wordpress.org/Function_Reference/current_time