简体   繁体   中英

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_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

thank you, i hope you guys understand my language

regards Yongki Agustinus

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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