• Resolved beda69

    (@beda69)


    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://ww.wp.xz.cn/plugins/coursepress/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter beda69

    (@beda69)

    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

    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.