I could use some assistance with an sql query. I have a small 3 column table, id, ip, and birthday. id auto increments.
I'm trying to select all birthdays that are associated with a specific ip, but I'm not sure if the SQL statement I wrote is correct. The var_dump returns an empty array. If someone could check this for me it would be appreciated.
global $wpdb; $query = "SELECT birthday FROM $table WHERE ip=$ip"; $results = $wpdb->get_results($query, ARRAY_A); var_dump($results);