How best to handle database version dependence (from $wp_db_version)

I sorted this out. It looks like the core team rolls out new versions of the database with their beta program. So, it’s plenty easy to get advance warning. And, the database upgrades live in wp-admin/includes/upgrade.php. There’s a sequence of functions in there named things like upgrade_500, upgrade_560, upgrade_590. They’re named for the WordPress version … Read more

how to get Nearby zipcode

Most likely your values $latitude and/or $longitude are not what you expect them to be. So radians($latitdue) becomes radians() or radians(”). For getting a single row, get_row() is usually the better choice instead of get_results(). $zipdetail = $wpdb->get_row( “SELECT * FROM `li_zipcode` WHERE `zip_code` = ‘$zipcode'”, OBJECT ); If $zipcode is coming from an untrusted … Read more