WordPress database error Unknown column ‘r.ip_address’
-
Hello, using version 1.0.5. I’d like to programmatically execute ngsurvey shortcodes, so I do
do_shortcode('[ngsurvey id="'.$id.'"]')
. Logs show following error message:WordPress database error Unknown column 'r.ip_address' in 'where clause' in statement SELECT r.id, r.created_by, r.created_date_gmt, r.finished_date_gmt FROM wp_ngs_responses r INNER JOIN wp_ngs_tracking t ON r.post_id = r.id AND t.post_type = 2 WHERE survey_id = 100539 AND r.ip_address = '111.55.55.222' by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/sometemplate/single.php'), do_shortcode, preg_replace_callback, do_shortcode_tag, NgSurvey_CPT->handle_shortcode, NgSurvey_Controller_Survey->display, NgSurvey_Model_Responses->check_response
The SQL statement seems to not refer to
t
correctly, like it should beON t.post_id = r.id
andAND t.ip_address =
instead. Correcting that inNgSurvey_Model_Responses->check_response
makes the error go away.
- The topic ‘WordPress database error Unknown column ‘r.ip_address’’ is closed to new replies.