简体   繁体   English

Mysql查询脚本怪异

[英]Mysql query script weird

first im sorry my english is not too good, 首先我很抱歉我的英语不太好,

i just wondering about something i dont know and its weird for me so, example : i have 2 tables in my mysql database let say 1st table called "one" second one is "two" if i want to CRUD from table "one" using PHP script, i dont need to use backtick --> ` <-- mark, i dont know how to call it in english, i just using, eg: 我只是想知道我不知道的东西,这对我来说很奇怪,例如:我在我的mysql数据库中有2个表让我们说第一个表叫“一个”第二个是“两个”如果我想从表“一个”使用CRUD PHP脚本,我不需要使用反引号 - >`< - mark,我不知道如何用英语调用它,我只是使用,例如:

mysql_query("SELECT * FROM one WHERE id='1'");

but i dont know why, if i want to do the same for table "Two" i must use --> ` <-- mark, and it doesnt work if i not using that, its working if i use this : 但我不知道为什么,如果我想对表“二”做同样的事情,我必须使用 - >`< - 标记,如果我不使用它,它不起作用,如果我使用它,它的工作:

mysql_query("SELECT * FROM `two` WHERE `id`='1'");

maybe some one know about this, so i will not think if its weird anymore :D 也许有人知道这一点,所以我不会想到它是否会变得奇怪:D

thank you, i hope you guys understand my language 谢谢,我希望你们能理解我的语言

regards Yongki Agustinus 对于Yongki Agustinus

你的two表很可能以一些mysql保留字命名(或者名称包含一些非字母数字符号),因此需要额外的格式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM