我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何在php中添加自动增量主键

I have my database with table test. It has a primary id "Id" which is auto-increment. Now the id is in the format 1,2,3.. . .Is it possible to store the primary Id as A1,A2,A3 .. . . and so on(with auto-increment).

You can fetch that id in A1,A2,A3

 SELECT concat('A',id) FROM table_name;

You cant create that of primary key format in mysql

近期文章

  • 尝试自动加载类时出现此错误
  • 基于浏览器的上传到OpenStack ObjectStorage
  • 如何将url-array-parameter传递给pg_execute
  • 在线捕获签名的最佳方法是什么?
  • 从数据库查询创建Google地图标记
  • 如何将字符串值xbox转换为array()? [重复]
  • Laravel 5在API路由上应用用户本地化
  • html5视频标签不使用php在chrome上播放
  • 自动增量列ID不是从1开始
  • 删除angularjs下拉列表中的未定义值
  • FormData不将数据发布到php后端脚本
  • 我可以在我的网站PHP上获得用户的完整地址吗?
  • 在foreach循环中实例化静态对象
  • 使用IMAP和PHP阅读电子邮件 - 拒绝连接
  • 图像显示为html mime gibberish - PHP - Glide
  • 如何从android发送到Web服务器的位置
  • 从目录中读取文件并回显某些行
  • 我的代码出错,但我无法找到解决方法
  • 隐藏特定的woocommerce帐单字段
  • 如何基于子域url get_template_part()?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华