Title: WordPRress database error
Last modified: April 15, 2020

---

# WordPRress database error

 *  Resolved [bigdrop.gr](https://wordpress.org/support/users/bigdropgr/)
 * (@bigdropgr)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/wordprress-database-error/)
 * Hi,
 * I get this error:
 * [15-Apr-2020 16:10:59 UTC] WordPress database error Got error ’empty (sub)expression’
   from regexp for query SELECT MAX(CAST(SUBSTRING(`meta_value`,1,4) AS UNSIGNED))
   as `new_number` FROM wp_postmeta WHERE `meta_key` = ‘_wcson_order_number’ AND`
   meta_value` REGEXP SUBSTRING(‘5444’,1,0) made by require(‘wp-blog-header.php’),
   require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’),
   WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_checkout’),
   WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout,
   WC_Checkout->create_order, do_action(‘woocommerce_checkout_update_order_meta’),
   WP_Hook->do_action, WP_Hook->apply_filters, WCSON_ORDER_NUMBER::wcson_order_number,
   WCSON_ORDER_NUMBER::wcson_generate_new_order_number
 * This error is generated each time someone makes a purchase on my site.
    It is
   caused by your plugin. What could be the solution?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwordprress-database-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [vjinfotech](https://wordpress.org/support/users/vjinfotech/)
 * (@vjinfotech)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/wordprress-database-error/#post-12692421)
 * Hi
 * Thank you for getting in touch!!
 * please mail me on [support@vjinfotech.com](https://wordpress.org/support/topic/wordprress-database-error/support@vjinfotech.com?output_format=md)
   and i will provide solution as soon as possible.
 * thanks and have a nice day
 *  [sabare2662](https://wordpress.org/support/users/sabare2662/)
 * (@sabare2662)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/wordprress-database-error/#post-13206529)
 * New order id is not taking to payment gateway portal. it’s showing different 
   id there.
    -  This reply was modified 5 years, 10 months ago by [sabare2662](https://wordpress.org/support/users/sabare2662/).
 *  Plugin Author [vjinfotech](https://wordpress.org/support/users/vjinfotech/)
 * (@vjinfotech)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/wordprress-database-error/#post-13220502)
 * Hi
 * Thank you for getting in touch!!
 * please mail me on [support@vjinfotech.com](https://wordpress.org/support/topic/wordprress-database-error/support@vjinfotech.com?output_format=md)
   and i will provide solution as soon as possible.
 * thanks and have a nice day

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WordPRress database error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woo-custom-and-sequential-order-number_6f94a1.
   svg)
 * [Woo Custom and Sequential Order Number](https://wordpress.org/plugins/woo-custom-and-sequential-order-number/)
 * [Support Threads](https://wordpress.org/support/plugin/woo-custom-and-sequential-order-number/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-custom-and-sequential-order-number/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-custom-and-sequential-order-number/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-custom-and-sequential-order-number/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [vjinfotech](https://wordpress.org/support/users/vjinfotech/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/wordprress-database-error/#post-13220502)
 * Status: resolved