There is no difference in this respect between PHP 5.3 and 5.5. The code doesn’t need to change.
However, you should still use prepare properly. Like so:
$query = $wpdb->prepare( 'UPDATE wp_building_plan SET sale_price = %s, available = %s, broker_name = %s, broker_email = %s, broker_phone = %s WHERE id = %s', $sale_price, $available, $broker_name, $broker_email, $broker_phone, $unit_id );
$wpdb->query($query);
If you are seeing a difference between the servers, then the issue is probably with the database itself. Is the table on one of them read-only or some such thing? Does the table even exist? Check the new database using a tool like phpMyAdmin and see what’s up there.
Related Posts:
- Should I use wpdb prepare?
- Is it mandatory to use $wpdb->prefix in custom tables
- $wpdb->insert_id
- Check for success of $wpdb->update() correctly
- WordPress and multithreading
- $wpdb->insert is changing a value
- Actions or filters fired when data is saved in a custom table
- Retrieving custom fields with $wpdb->get_results
- Really simple query giving error in SQL syntax
- Custom Plugin Database relations
- why creating tables using $wpdb is not being executed while installing plugins?
- How to use mysql IN statement with wpdb update method?
- Using $wpdb object in a widget
- Activation hook not creating table
- $wpdb -> Batch insert from XML File?
- How to Download and install plugin database remotely
- How to insert data to a database table when the field is not yet created?
- Where to store the name of a custom table?
- include wp-blog-header not working on MAMP
- creating custom function to log actions in plugin
- SQL query for custom taxonomy slugs
- Issue regarding $wpdb->prepare()
- Error on inserting a form value to database
- How to create database table, add data, update and delete using wpdb via plugins?
- Using WPDB to output raw XML fails because of wp-blog-header.php
- how to search users by ajax live search
- Adding custom end points, No error line
- Intermittent database errors when accessing WordPress database
- Storing data in wordpress database from ajax call from different website
- wpdb->prepare and mysql UPDATE – how is it done?
- $wpdb->prepare with LIKE and sprintf
- How to optimize multiple insert into wordpress database
- $wpdb->update() always need a second try
- Data inserted by wpdb insert is different than data pressnt in database.
- Proper Prepare Statement for ALTER TABLE and using AFTER
- $wpdb->prepare is not working like mysql_real_escape_string
- How to avoid conflicts with db.php / $wpdb and other plugins that decide to use them?
- Plugin to create Posts and Forums then choose category and parent forum
- $wpdb->update Issue
- How to relate the Category to user?
- WordPress database error: [Query was empty] – using $wpdb->prepare()
- Why doesn’t my Table get created?
- How to display specific data from a custom table to logged in users with a custom role
- $wpbd->insert_id is returning null
- How to store sensitive user data (passwords)
- How to get inserted row IDs for bulk/batch insert with wpdb query?
- WordPress Query doesn’t return the correct value
- User avatar-ACF fields
- bindParam? WordPress 4.9.5 SQL LIKE statement %s and %LIKE%
- Update database record in plugin
- Dedicated server and WPDB Class : huge slow-down of the website
- How to implement pagination into a wpdb->result query?
- How to CRUD from wordpress database in wordpress theme?
- I can’t write in my DB using $wpdb->insert
- $wpdb how can i save my postmeta table before querying it
- WordPress plugin tables become corrupt
- Nothing happens on WordPress Update command
- Fixing plugin for wpdb::prepare
- multiple record insert creating many duplicate records
- Plugin directory “Last Updated” not changed after initial commit?
- What is the recommended way to create plugin administration forms?
- Fatal error: Call to undefined function wp_mail()
- Does WordPress have an Browser Agent?
- How Do I Load My Action Earlier Enough?
- How to check WordPress website username and password is correct
- Filter on the_content ignores shortcodes
- Custom theme sufficient or custom plugin neccessary for this feature set?
- Check spam in custom form – akismet
- PHP library that can merge stylesheet with inline style [closed]
- admin_notices not displaying in plugin
- How to get color name in PanelColorSettings in custom Gutenberg block?
- Cannot redeclare function error on the same line
- js/css updating when making a plugin
- Adding a brand column to WooCommerce Products
- Mixing and Matching – Custom templates in a WordPress plugin
- Open Graph Object Debugger & url parameters – Page Not Found result
- How to Move the Comments Bubble to the Right Side of the Toolbar
- How should I go about registering JavaScript that isn’t a file? [duplicate]
- Can’t find where to modify attrbitutes
- How to pull user/author profile data in a plugin?
- Add Password Generator on password protected page
- How to add custom options for plugin into the add post screen – like yoast seo
- Listing wordpress users with a search function
- Plugin won’t activate
- dbdelta failing with error: “WordPress database error Table ‘wp_2_myPlugin’ already exists
- Plugin could not be activated because it triggered a fatal error?
- Get cat parameter from admin-ajax
- How to determine primary editor for a page/post
- Limit get_next_post to posts from the same author
- how to create a shortcode from a variable in plugin
- Error Connecting to Database WHEN Installing WordPress on XAMPP [Tried All the Usual Stuff] (Pics Included)
- Adding body class in author page for custom role
- TinyMCE 4.7.11 – Enable hidden WordPress core plugins? (referencing a wp-includes from plugin.php)
- Enqueue scripts based on site.
- WordPress filter custom posts by multi terms of of a taxonomy
- How can I give access to my plugin sections in admin?
- Making plugin output customizable
- how to catch a data from a array in WordPress
- External api call using wordpress
- Set link dialog to open in blank by default