Advertisement
Beee

db query

Sep 10th, 2017
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. global $wpdb;
  2. $sql_data = array(
  3.     'action_time'        => strtotime( date( 'Y-m-d  H:i:s', strtotime( '+' . get_option( 'gmt_offset' ) . ' hours' ) ) ),
  4.     'action_user'        => get_current_user_id(),
  5.     'action'             => esc_attr( $action ),
  6.     'action_generator'   => esc_attr( $action_generator ),
  7.     'action_description' => esc_attr( $action_description ),
  8. );
  9. $wpdb->insert( $wpdb->prefix . 'action_logs', $sql_data );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement