Custom Table Multiple Value Query
-
I have been researching the last hour of whether or not I can run a query within wordpress on a custom table that I made using two WHERES. Now I’m new to mysql and php ( 9 months in ) and am just wondering if there is a way to do it besides a AND.
Here is an example of my code
$check_current = $wpdb->get_row(“SELECT * FROM $weather_table WHERE status = ‘current’ AND condition = $current_weather”);
status and condition are both fields and I’m trying to find out whether both exist to rewrite the current field. The closest I’ve come is possibly using the prepare function in wordpress and php but don’t know what that is exactly just know it helps with sql injection and security. Can you run a multiple value query in wordpress?
The topic ‘Custom Table Multiple Value Query’ is closed to new replies.