Skip to content
This repository has been archived by the owner on Sep 25, 2021. It is now read-only.

issue with column groups in table users #536

Open
hungryfrankie opened this issue Jun 19, 2021 · 1 comment
Open

issue with column groups in table users #536

hungryfrankie opened this issue Jun 19, 2021 · 1 comment

Comments

@hungryfrankie
Copy link

when. a new user registers the data is not entered in the db
the reason is the field named groups.
sql breaks because it is a reserved word.
I had to change the name of this field
mysql 8.0.25
php 7.3.24

@hungryfrankie
Copy link
Author

hungryfrankie commented Jun 19, 2021

the solution is to put it in backtick

I changed the querry to this

 $query = "INSERT INTO " . $DBPrefix . "users
                          (nick, password, hash, name, address, city, prov, country, zip, phone, nletter, email, birthdate,
                          suspended, language, balance, timezone,`groups`)
                          VALUES
                          (:nick, :password, :hash, :name, :address, :city, :prov, :country, :zip, :phone, :nletter, :email, :birthdate,
                          :suspended, :language,  :balance, :timezone,:groups)";
  `

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant