MySQL GROUP BY and HAVING clauses with PHP libraries

MySQL GROUP BY and HAVING clauses with PHP libraries

dkdkddkdkd Posts: 4Questions: 2Answers: 0

I've got a query involving some grouped items that requires me to use a HAVING clause in conjunction with GROUP BY, rather than WHERE. Is this something that is supported in the PHP libraries with editor? Thanks!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin
    Answer ✓

    I'm sorry to say not. GROUP BY causes all sorts of complexities with regard to the editing aspect of Editor (e.g. needing to update multiple rows in the database, while the end user only sees a single row).

    You can create a VIEW and then have the libraries read that if it is a read only table though.

    Regards,
    Allan

  • dkdkddkdkd Posts: 4Questions: 2Answers: 0

    I ended up getting the best of both worlds: I created a view that gives me the stats I want, and joined that to the rest of the editable table. Thanks!

This discussion has been closed.