• Resolved jhobeaston

    (@jhobeaston)


    Hello…
    i have problem test with one of list views (show user)
    result :
    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 ‘%d LIMIT 20 OFFSET 0’ at line 1

    Another views is normal if its not using criteria “where [var] = [%D, %S, etc]
    (ex. show all user)

    how to fix it??
    i m sorry i m newbie. many thanks be4.

    https://www.ads-software.com/plugins/dbview/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author john ackers

    (@john-ackers)

    The scripts like ‘show user’ that have a % in them get loaded and invoked from other scripts that pass an argument (the user id) to them. They don’t run in isolation. Sorry the error message is misleading.

    Thread Starter jhobeaston

    (@jhobeaston)

    So how if i want to get current user to show current user detail from sintax?? because i need it for my custom table. i want to show linked table that need current user.
    Please give me the example sql script for it.
    many thanks John.

    Plugin Author john ackers

    (@john-ackers)

    I have just committed a small change so that you can pass two arguments (arg1, arg2) from dbview on a public page to MySQL. So you can use the dbview shortcode like this:

    [dbview name='show user' arg1=1 pagesize=10]

    which runs the query associated with ‘show user’ and shows data for the user with the ID of 1.

    To show the current user detail, you’d need to get the current user and so you’d need to run some PHP e.g. by using a PHP snippet and invoke the shortcode.

    If you want to create links on one table that, when clicked, loads another table, let me know. It’s not currently supported apart from inside the dashboard.

    Plugin Author john ackers

    (@john-ackers)

    You can load another table in 0.5.5.

    Thread Starter jhobeaston

    (@jhobeaston)

    Ok got it John.
    thanks a lot

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘error when show user’ is closed to new replies.