L
L
lena05k2020-12-06 18:13:24
PHP
lena05k, 2020-12-06 18:13:24

Can't find syntax error in SQL?

I am new to this. I can't find a syntax error.


You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group, password, email) VALUES ( NULL, NULL, NULL, ' at line 2


Here is not the complete code.
$result2 = "
INSERT INTO register 
          (id, family_name, first_name, middle_name, year, faculty, direction, group, password, email)
VALUES
           ( NULL, NULL, NULL, NULL, '$year', '$faculty', '$direction', '$group', NULL, NULL)";

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
galaxy, 2020-12-06
@lena05k

group - reserved word, put in quotation marks`group`

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question