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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -