# SOLVED::Error 42000 executing statement

**URL:** <https://community.modx.com/t/solved-error-42000-executing-statement/4253>\
**Category:** Support\
**Created:** [July 23, 2021, 4:49pm UTC](https://community.modx.com/t/solved-error-42000-executing-statement/4253 "2021-07-23T16:49:46Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![halftrainedharry](https://community.modx.com/user_avatar/community.modx.com/halftrainedharry/32/1063_2.png) [@halftrainedharry](https://community.modx.com/u/halftrainedharry)\
**Post date:** [July 26, 2021, 5:14pm UTC](https://community.modx.com/t/solved-error-42000-executing-statement/4253/3 "2021-07-26T17:14:14Z")

</div>

In your [previous post](https://community.modx.com/t/sudden-sql-syntax-error-in-manager-displaying-tvs-in-categories/2823/4) (in another thread) it was suggested, that [this issue](https://github.com/Sterc/Formalicious/issues/4) on github could be the reason for the errors, as **RANK** is now a **reserved keyword** in MySQL 8.

Have you tested, if the errors disappear, when you change these lines ([formaliciousfield](https://github.com/Sterc/Formalicious/blob/7558f119f6e47965a8c766bb33a518445ddbac81/core/components/formalicious/model/formalicious/formaliciousfield.class.php#L77), [formaliciousform](https://github.com/Sterc/Formalicious/blob/7558f119f6e47965a8c766bb33a518445ddbac81/core/components/formalicious/model/formalicious/formaliciousform.class.php#L61), [formaliciousstep](https://github.com/Sterc/Formalicious/blob/7558f119f6e47965a8c766bb33a518445ddbac81/core/components/formalicious/model/formalicious/formaliciousstep.class.php#L22)) and maybe other occurrences in the code to

```auto
$criteria->sortby('`rank`', 'ASC');

```

* * *

The problem for the Gallery extra could be the same, as the database tables `modx_gallery_albums` and `modx_gallery_album_items` also have a column named “rank”.

---

_[View the full topic](https://community.modx.com/t/solved-error-42000-executing-statement/4253)._
