Editor, complex sql...

Editor, complex sql...

ztevieztevie Posts: 101Questions: 23Answers: 5

Hi!
I'm trying out the editor demo, it looks sweet and would save a lot of time and headaches for sure.
One question though: Would the php-scripts be able to take care of more complex sql-questions than regular joins? One example is CONCAT_GROUP. I have a SELECT looking like this:
select users.user_id, users.user_nickname, GROUP_CONCAT(roles.role_desc), workteam.workteam_name, workdesc.workdesc_name from users, roles, permissions, workteam, workdesc where users.user_id = permissions.user_id AND roles.role_id = permissions.role_id AND users.workteam_id = workteam.workteam_id AND workdesc.workdesc_id = users.workdesc_id group by users.user_id

The GROUP_CONCAT(roles.role_desc) contains several values, it's like an array within the array added as a field for each distinct user that the select returns...

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,819Questions: 1Answers: 10,517 Site admin
    Answer ✓

    Sorry no. The PHP (and .NET) scripts provided with Editor are not designed to work with more complex SQL such as functions and grouping.

    For that kind of thing you would nee to write your own server-side code. The client / server parameters that Editor uses is documented for exactly that kind of thing.

    Allan

  • ztevieztevie Posts: 101Questions: 23Answers: 5
    edited November 2016

    Ok, thanks! Seems I have some reading to do. :)
    I already have php classes doing all the database work with PDO, but the update, insert and delete would be a lot easier if I could use the functions already included in your scripts.

    Another quick question: How does the demo-》purchased version work? If I buy it, would I have to download new versions of editor files or will there be a key supplied to me? Thinking if I make changes in the demo files I use now for testing, I would have to redo those changes for the purchased version?

  • allanallan Posts: 63,819Questions: 1Answers: 10,517 Site admin
    Answer ✓

    You basically need to replace the Editor Javascript files from the demo with those from the licensed download. There are full details here - more reading for you :wink:

    Thinking if I make changes in the demo files I use now for testing, I would have to redo those changes for the purchased version?

    No you wouldn't. Only the core Editor Javascript files need to be updated.

    Allan

This discussion has been closed.