我试图用phpMyAdmin或PHP与PDO对MySQL进行选择查询.
SELECT 'uid' FROM 'clusters' WHERE 'lat'<='47.21125' AND 'lat'>='39.21125' AND 'lng'<='32.90243' AND 'lng'>='22.90243'
Run Code Online (Sandbox Code Playgroud)
但是,phpMyAdmin说:
#1064 - 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 ''clusters' WHERE 'lat'<='47.21125' AND 'lat'>='39.21125' AND 'lng'<='32.90243' A' at line 1
Run Code Online (Sandbox Code Playgroud)
这有什么问题?
''在MySQL中创建一个字符串文字,因此您的查询是从字面"簇"中选择文字"uid",这是无效的.使用背景(或没有)
SELECT Uid FROM clusters WHERE lat <= 47.21125 AND lat >= 39.21125
AND lng >= 22.90243
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
33054 次 |
| 最近记录: |