mysqli_free_result()

  返回最后一次查询中使用的自动生成 id,如果是多表插入,返回的是第一个被插入的id。

mysqli_query($con,"INSERT INTO websites (name,url,alexa) 
VALUES ('菜鸟教程','http://www.runoob.com',5633)");

// 输出自动生成的 ID
echo "新 id 为: " . mysqli_insert_id($con); 

 

相关文章:

  • 2021-09-07
  • 2022-12-23
  • 2022-01-29
  • 2022-01-02
  • 2021-04-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
  • 2021-06-01
  • 2021-09-30
相关资源
相似解决方案