mysqli fatal error: No index used in query/prepared statement

后端 未结 1 1372
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-26 10:33

I want to execute a simple prepared Statement using mysqli, but it won\'t work.

I have this table:

CREATE TABLE IF NOT EXISTS `account` (
  `id` int(11)          


        
1条回答
  •  有刺的猬
    2021-01-26 11:11

    Well I think you have to do this:

    CREATE TABLE IF NOT EXISTS `account` (
      `id` PRIMARY KEY int(11) NOT NULL AUTO_INCREMENT,
       // the rest
    

    The above code makes the id field of your table as PRIMARY KEY so it never repeats itself and it remains the index of your table.

    0 讨论(0)
提交回复
热议问题