# Bookmarker Tutorial Error Assistance

**URL:** <https://discourse.cakephp.org/t/bookmarker-tutorial-error-assistance/1376>\
**Category:** Need Help\
**Created:** [October 24, 2016, 9:20pm UTC](https://discourse.cakephp.org/t/bookmarker-tutorial-error-assistance/1376 "2016-10-24T21:20:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcowen](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@dcowen](https://discourse.cakephp.org/u/dcowen)\
**Post date:** [October 24, 2016, 9:20pm UTC](https://discourse.cakephp.org/t/bookmarker-tutorial-error-assistance/1376/1 "2016-10-24T21:20:57Z")

</div>

I am new to CakePHP and working through the bookmarker tutorial. I have gotten to the step where you are adding a tags.ctp page. When I add the code per the instructions I get the following error.

Error: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #9 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘cake\_bookmarks.BookmarksTags.tag\_id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql\_mode=only\_full\_group\_by

I have made no changes to the bookmarks table or to the query. What am I doing wrong? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![dcowen](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@dcowen](https://discourse.cakephp.org/u/dcowen)\
**Post date:** [October 24, 2016, 9:23pm UTC](https://discourse.cakephp.org/t/bookmarker-tutorial-error-assistance/1376/2 "2016-10-24T21:23:31Z")

</div>

I have found that it is in the grouping of the query and that the newer versions don’t allow. The problem is that I can’t figure out how to correct it. I believe it is in the BookmarksTable.php, is that correct? How do I change the query?

---

<div class="post-metadata">

**Author:** ![Graziel](https://avatars.discourse-cdn.com/v4/letter/g/71c47a/32.png) [@Graziel](https://discourse.cakephp.org/u/Graziel)\
**Post date:** [October 24, 2016, 9:52pm UTC](https://discourse.cakephp.org/t/bookmarker-tutorial-error-assistance/1376/3 "2016-10-24T21:52:21Z")

</div>

there was a change in mysql 5.7 [https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html](https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html) so you can:

1. disable ONLY\_FULL\_GROUP\_BY [http://stackoverflow.com/questions/23921117/disable-only-full-group-by](http://stackoverflow.com/questions/23921117/disable-only-full-group-by)
2. add selected fields to -\>group()
3. change mysql version

---

<div class="post-metadata">

**Author:** ![dcowen](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@dcowen](https://discourse.cakephp.org/u/dcowen)\
**Post date:** [October 24, 2016, 10:04pm UTC](https://discourse.cakephp.org/t/bookmarker-tutorial-error-assistance/1376/4 "2016-10-24T22:04:05Z")

</div>

Thank you! Item #1 worked. Would you be able to clarify where I would add additional fields to the query grouping. I have been reading documentation and working tutorials and having a really hard time with where that is coming from.

---

<div class="post-metadata">

**Author:** ![Graziel](https://avatars.discourse-cdn.com/v4/letter/g/71c47a/32.png) [@Graziel](https://discourse.cakephp.org/u/Graziel)\
**Post date:** [October 24, 2016, 10:07pm UTC](https://discourse.cakephp.org/t/bookmarker-tutorial-error-assistance/1376/5 "2016-10-24T22:07:52Z")

</div>

[http://book.cakephp.org/3.0/en/orm/query-builder.html#aggregates-group-and-having](http://book.cakephp.org/3.0/en/orm/query-builder.html#aggregates-group-and-having) you can add it anywhere in the query before it is executed
