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

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -