Title: DB Error
Last modified: August 30, 2016

---

# DB Error

 *  Resolved [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/db-error-15/)
 * WordPress database error: [You have an error in your SQL syntax; check the manual
   that corresponds to your MySQL server version for the right syntax to use near‘-
   25, 25’ at line 3]
    SELECT SQL_CALC_FOUND_ROWS wp_users.ID FROM wp_users INNER
   JOIN wp_usermeta ON ( wp_users.ID = wp_usermeta.user_id ) WHERE 1=1 AND ( CAST(
   wp_usermeta.meta_value AS CHAR) = ‘student’ ) ORDER BY ID ASC LIMIT -25, 25
 * Clean WP, theme 2014, no plugins
 * Fresh install.
 * On all pages where users are queried
 * Thanks
 * [https://wordpress.org/plugins/coursepress/](https://wordpress.org/plugins/coursepress/)

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

 *  Thread Starter [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/db-error-15/#post-6277492)
 * also, once you answer, might you elaborate:
 * 1. How do you store your data? Your courses, as example, seem to be Post Types
   but at same time, they seem not to be.
 * I ask because I need to interact with the data of this plugin, but I can only
   if those are stored as classic post types.
 * 2. How do you store the relation Course-Module-Scholar-Teacher etc? custom fields?
   post meta?
 * Thanks
 *  Plugin Author [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * (@wpmudev-support4)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/db-error-15/#post-6277666)
 * Hey there beda69,
 * Hope you’re well today!
 * The error mentioned in your first post has already been reported to our developers
   and the fix should be included in one of the following versions of the plugin.
 * > How do you store your data? Your courses, as example, seem to be Post Types
   > but at same time, they seem not to be.
 * Courses, Units, Modules etc are post types.
 * > How do you store the relation Course-Module-Scholar-Teacher etc? custom fields?
   > post meta?
 * Unit (course_id = post_parent)
 * Unit module (unit_id = post_parent)
 * Instructors (course post meta key “instructors”)
 * Students are linked to each course by user meta (wp_enrolled_course_date_3033
   for instance – one for each course)
 * Hope this helps 🙂
 * Best regards,
    Bojan

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

The topic ‘DB Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/coursepress_f7e9b6.svg)
 * [CoursePress Learning Management System](https://wordpress.org/plugins/coursepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/coursepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/coursepress/)
 * [Active Topics](https://wordpress.org/support/plugin/coursepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/coursepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/coursepress/reviews/)

## Tags

 * [db](https://wordpress.org/support/topic-tag/db/)

 * 2 replies
 * 2 participants
 * Last reply from: [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/db-error-15/#post-6277666)
 * Status: resolved