mysql - PHP $wpdb Select? -
i use assistance sql query. have small 3 column table, id, ip, , birthday. id auto increments.
i'm trying select birthdays associated specific ip, i'm not sure if sql statement wrote correct. var_dump returns empty array. if check me appreciated.
global $wpdb; $query = "select birthday $table ip=$ip"; $results = $wpdb->get_results($query, array_a); var_dump($results);
wrap ip address passed mysql single quotes
, use actual table name. if resulting array blank, missing ip table.
Comments
Post a Comment