SQL error in php_errorlog
-
Hello again @javmah,
Thanks for the recent update – it did resolve the issues we were having and I have re-enabled the plugin. I’m looking through my error logs and see a regular error occurring in php_errorlog. I’m not sure if it was there before, but it is happening often.
WordPress database error Table ‘XXXXXXX.wp_postmeta’ doesn’t exist for query SELECT * FROM 5TO_posts INNER JOIN
wp_postmetaONwp_posts.ID=wp_postmeta.post_idWHEREwp_posts.post_type= ‘wpcf7_contact_form’ ANDwp_postmeta.meta_key= ‘_form’I think I’ve resolved it locally by changing this line:
$cf7Forms = $wpdb->get_results( “SELECT * FROM {$wpdb->prefix}posts INNER JOINwp_postmetaONwp_posts.ID=wp_postmeta.post_idWHEREwp_posts.post_type= ‘wpcf7_contact_form’ ANDwp_postmeta.meta_key= ‘_form’ ” );to
$cf7Forms = $wpdb->get_results( “SELECT * FROM {$wpdb->prefix}posts INNER JOIN {$wpdb->prefix}postmeta ON {$wpdb->prefix}posts.
ID= {$wpdb->prefix}postmeta.post_idWHERE {$wpdb->prefix}posts.post_type= ‘wpcf7_contact_form’ AND {$wpdb->prefix}postmeta.meta_key= ‘_form’ ” );Can you confirm this fix, and patch if appropriate?
Thanks again!
The topic ‘SQL error in php_errorlog’ is closed to new replies.