- This topic has 4 replies, 2 contibutors, and was last updated 8 years ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Question
Answers
Viewing 5 posts - 1 through 5 (of 5 total)
- The question ‘SQL Errors from templates’ is closed to new replies.
BuddyBoss Home – Web › Support Forums › Themes › OneSocial theme › SQL Errors from templates
Tagged: sql, sql errors, templates
Hello,
Ben from WCVendors has informed me I have lots of SQL errors on my site. He has asked me to tell you to download https://www.consciouscrafties.com/sm.txt so you can view the errors your templates are generating and fix them.
Please can you confirm you are going to fix these please?
Thank you,
Karen
Thanks for your input, I have notified developers on high priority to fix them.
Regards
Varun Dubey
Hi @conscious-crafties, It seems it was WC vendor issue.
WCVendors PRO use this syntax:
$feedback = $wpdb->get_results(
"
SELECT * FROM $table_name
WHERE order_id = $order_id
"
);
its not safe syntax.
This is better:
$feedback = $wpdb->get_results( $wpdb->prepare(
"
SELECT * FROM %s
WHERE order_id = %s
",
$table_name,
$order_id
) );
We will notifiy them to get fixed in coming updates.
Regards
Varun Dubey
OK thanks @vapvarun 🙂
I will close this thread, Feel free create new topic for any further concern.
Regards
Varun Dubey