Title: PHP Parse error: syntax error, unexpected &#8216;)&#8217; in
Last modified: July 15, 2021

---

# PHP Parse error: syntax error, unexpected ‘)’ in

 *  Resolved [tnchuntic](https://wordpress.org/support/users/tnchuntic/)
 * (@tnchuntic)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-in/)
 * Just reporting this bug.
 * Code:
    `$cat_sql = $wpdb->get_results( $wpdb->prepare("SELECT category FROM {
   $wpdb->prefix}mlw_questions WHERE quiz_id = %d ", $quiz_id), );`
 * Message:
    `[15-Jul-2021 06:59:24 UTC] PHP Parse error: syntax error, unexpected')'
   in /.../wp-content/plugins/quiz-master-next/php/classes/class-qmn-quiz-manager.
   php on line 500`
 * Solution:
    – Removed the extra comma inside the $wpdb->get_results
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-parse-error-syntax-error-unexpected-in%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [expresstechsupport](https://wordpress.org/support/users/expresstechsupport/)
 * (@expresstechsupport)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-in/#post-14668475)
 * Hi [@tnchuntic](https://wordpress.org/support/users/tnchuntic/),
 * Thanks for reaching out to us.
 * I will report this bug to our development team and they will look into the same
   as soon as possible.
 * Kind regards,
    Kriti
 *  [expresstechsupport](https://wordpress.org/support/users/expresstechsupport/)
 * (@expresstechsupport)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-in/#post-14684802)
 * Hi [@tnchuntic](https://wordpress.org/support/users/tnchuntic/),
 * Our developer has fixed this issue in the latest version of the plugin.
 * Regards,
    Kriti

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

The topic ‘PHP Parse error: syntax error, unexpected ‘)’ in’ is closed to new replies.

 * ![](https://ps.w.org/quiz-master-next/assets/icon-128x128.png?rev=3158087)
 * [Quiz and Survey Master (QSM) - Easy Quiz and Survey Maker](https://wordpress.org/plugins/quiz-master-next/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/quiz-master-next/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/quiz-master-next/)
 * [Active Topics](https://wordpress.org/support/plugin/quiz-master-next/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/quiz-master-next/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/quiz-master-next/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [expresstechsupport](https://wordpress.org/support/users/expresstechsupport/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-in/#post-14684802)
 * Status: resolved