Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'rank' as the reserved word #105

Merged
merged 1 commit into from Jun 15, 2023
Merged

Add 'rank' as the reserved word #105

merged 1 commit into from Jun 15, 2023

Conversation

tanjinx
Copy link
Contributor

@tanjinx tanjinx commented Jun 15, 2023

mysql> SELECT `id`,`channel_id`,`payload`,`type`,`ts`,`date_create`,`date_update`,`date_delete`,`rank`,`parent_id` FROM bookmarks WHERE channel_id = 1159130243347 AND date_delete = 1686781283 ORDER BY rank ASC;
ERROR 1105 (HY000): syntax error at position 203 near 'ASC'

mysql> SELECT `id`,`channel_id`,`payload`,`type`,`ts`,`date_create`,`date_update`,`date_delete`,`rank`,`parent_id` FROM bookmarks WHERE channel_id = 1159130243347 AND date_delete = 1686781283 ORDER BY `rank` ASC;
Empty set (0.00 sec)
The rank is a MySQL reserved word defined in MySQL version 8.0. 2. Therefore, you cannot use rank as a column name. You need to use backticks around the rank.

discussion thread https://slack-pde.slack.com/archives/CQGR39RA5/p1686854907680839?thread_ts=1686781600.137799&cid=CQGR39RA5

@tanjinx tanjinx requested a review from muglug June 15, 2023 22:56
@muglug muglug merged commit e487593 into main Jun 15, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants