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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -