Если не проходит запрос к БД Mysql, то проверьте не попадает ли он под выражение "Зарезервированные слова".
Зарезервированные слова MySQL - те, что в таблице ниже нельзя использовать для имен ваших таблиц БД:
| action |
add |
aggregate |
all |
| alter |
after |
and |
as |
| asc |
avg |
avg_row_length |
autojncrement |
| between |
bigint |
bjt |
binary |
| blob |
bool |
both |
by |
| cascade |
case |
char |
character |
| change |
check |
checksum |
column |
| columns |
comment |
constraint |
create |
| cross |
current_date |
current_time |
current_timestamp |
| data |
database |
databases |
date |
| datetime |
day |
day_hour |
day_minute |
| day_second |
dayofmonth |
dayofweek |
dayofyear |
| dec |
decimal |
default |
delayed |
| delay_key_write |
delete |
desc |
describe |
| distinct |
distinctrow |
double |
drop |
| end |
else |
escape |
escaped |
| enclosed |
enum |
explain |
exists |
| fields |
file |
first |
float |
| float4 |
float8 |
flush |
foreign |
| from |
for |
full |
function |
| global |
grant |
grants |
group |
| having |
heap |
high_priority |
hour |
| hour_minute |
hour_second |
hosts |
identified |
| ignore |
in |
index |
infile |
| inner |
insert |
insert_id |
int |
| integer |
interval |
int1 |
int2 |
| int3 |
int4 |
int8 |
into |
| if |
is |
isam |
join |
| key |
keys |
kill |
last_insert_id |
| leading |
left |
length |
like |
| lines |
limit |
load |
local |
| lock |
logs |
long |
longblob |
| longtext |
low_priority |
max |
max_rows |
| match |
mediumblob |
mediumtext |
mediumint |
| middleint |
min_rows |
minute |
minute_second |
| modify |
month |
monthname |
myisam |
| natural |
numeric |
no |
not |
| null |
on |
optimize |
option |
| optionally |
or |
order |
outer |
| outfile |
pack_keys |
partial |
password |
| precision |
primary |
procedure |
process |
| processlist |
privileges |
read |
real |
| references |
reload |
regexp |
rename |
| replace |
restrict |
returns |
revoke |
| rlike |
row |
rows |
second |
| select |
set |
show |
shutdown |
| smallint |
soname |
sql_big_tables |
sql_big_selects |
| sql_low_priority_updates |
sql_log_off |
sql_log_update |
sql_select_limit |
| sql_small_result |
sql_big_result |
sql_warnings |
straight_join |
| starting |
status |
string |
table |
| tables |
temporary |
terminated |
text |
| then |
time |
timestamp |
tinyblob |
| tinytext |
tinyint |
trailing |
to |
| type |
use |
using |
unique |
| unlock |
unsigned |
update |
usage |
| values |
varchar |
variables |
varying |
| varbinary |
with |
write |
when |
| where |
year |
year_month |
zerofill |
Зарезервированные слова, которые появились в Mysql версии 4.1
| before |
collate |
convert |
| current_user |
day_microsecond |
div |
| dual |
false |
hour_microsecond |
| minute_microsecond |
mod |
no_write_to_binlog |
| second_microsecond |
separator |
spatial |
| true |
utc_date |
utc_time |
| utc_timestamp |
varcharacter |
|
Зарезервированные слова, которые появились в Mysql версии 5.0
| asensitive |
call |
condition |
| connection |
continue |
cursor |
| declare |
deterministic |
each |
| elseif |
exit |
fetch |
| goto |
inout |
insensitive |
| iterate |
label |
leave |
| loop |
modifies |
out |
| reads |
release |
repaet |
| return |
schema |
schemas |
| sensitive |
specific |
sql |
| sqlexception |
sqlstate |
sqlwarning |
| trigger |
undo |
upgrade |
| while |
|
|
Зарезервированные слова, которые появились в Mysql версии 5.1
| accessible |
linear |
master_ssl_server_cert |
| range |
read_only |
read_write |
Зарезервированные слова, которые появились в Mysql версии 5.5
| general |
ignore_server_ids |
master_heartbeat_period |
| maxvalue |
resignal |
signal |
| slow |
|
|
Зарезервированные слова, которые появились в Mysql версии 5.6
| get |
io_after_gtids |
io_before_gtids |
| master_bind |
one_shot |
partition |
| sql_after_gtids |
sql_before_gtids |
|
Новое зарезервированное слово добавилось Mysql в 5.7
В результате может возникать ошибка 1064 для Mysql