Rikhi Sahu
Rikhi Sahu

Reputation: 655

always getting this error when deletion performed

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 'Lock ' at line 171"

I think it's because 'Lock' is a reserved word but i am using it in my table.

so how to overcome this issue.

Upvotes: 1

Views: 49

Answers (2)

Vignesh Kumar A
Vignesh Kumar A

Reputation: 28403

You should use back tick character for reserved word

You need to use reserved word as 'Lock'

(Source: MySQL Reference Manual, 9.3 Reserved Words)

Upvotes: 0

xdazz
xdazz

Reputation: 160833

Use back ticks to quote the reserved words.

`lock`

Upvotes: 1

Related Questions