I am helping a friend update their website and move it over to a new server. Their old server is running php 5.3.6-13 and the new site is running php 5.5.
There is a custom plugin that uses $wpdb that allows the user to edit some information that is written to a custom table in the database, specifically:
$query = "UPDATE wp_building_plan SET sale_price = '$sale_price', available = '$available', broker_name = '$broker_name', broker_email = '$broker_email', broker_phone = '$broker_phone' WHERE id = '$unit_id' ";
$wpdb->query($query);
Here is the actual code for the plugin: http://snippi.com/s/dk7bxvx
On the server running 5.3 the data can be written to the appropriate rows within the wp_building_plan table when info is updated or changed. On the new server running 5.5 when data is changed within the plugin nothing is changed or written to the database at all.
I am trying to find a better way to write the UPDATE wp_building_plan code that is compatible with PHP 5.5
I've checked out the following links and tried to implement them but have not had any success: http://www.php.net/manual/en/function.mysql-db-query.php http://codex.wordpress.org/Class_Reference/wpdb http://make.wordpress.org/core/2012/12/12/php-warning-missing-argument-2-for-wpdb-prepare/ http://markoheijnen.com/the-future-of-wpdb/
Any tips or pushes in the right direction would be greatly appreciated, d