Tôi đã dành nhiều giờ để sửa lỗi này.Điều gì là sai với SQL này?
SELECT *
FROM `users`
WHERE `IP` = `123.231.213.132`
Điều gì là sai với điều này?
#1054 - Unknown column '123.231.213.132' in 'where clause'
Tôi đã dành nhiều giờ để sửa lỗi này.Điều gì là sai với SQL này?
SELECT *
FROM `users`
WHERE `IP` = `123.231.213.132`
Điều gì là sai với điều này?
#1054 - Unknown column '123.231.213.132' in 'where clause'
Bạn không nên sử dụng backticks có giá trị cột. bạn phải sử dụng dấu nháy đơn hoặc kép nếu không mysql sẽ xem xét giá trị đó như một tên cột.
SELECT *
FROM `users`
WHERE `IP` = '123.231.213.132'
Sử dụng dấu nháy đơn chứ không phải là nhân vật backtick cho `123.231.213.132``
SELECT *
FROM `users`
WHERE `IP` = '123.231.213.132'
It might be the single speach mark symbol. Try replacing them manually.
Use quotes ' not backticks ` for string literals
What's with the backticks? Use single quotes Also I'm assuming that users is a table name and IP is an entity of users.
Also...you have to end your statement with a semi-colon
you are using wrong quotation characters
to specify string value in mysql statement you have to use either '(single quote) or "(double quote)
`(backtick) characters are used to explicitly specify that quoted string represents a field name from where mysql should get the data
backticks are required in your statements if column names are conflicting with mysql's reserved keywords like index
, where
, vv
Thật là một sai lầm ngu ngốc. – Vercas