如何递增按顺序排列的列中的特定缺失值 [英] How to increment a particular missing value in a column which is in sequence

查看:59
本文介绍了如何递增按顺序排列的列中的特定缺失值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

S.No  Date    CollectionTime  Branch  Company  Rec-series    Receipt No   Receipt




1	2016-02-19	11:22:18am	   SP	  CFMS	     SP18	      SP18004315	4315




2	2016-02-19	11:39:38 am	   SP	  CFMS	     SP18	      SP18004316	4316




3	2016-02-19	11:41:21 am	   SP	  CFMS	     SP18	      SP18004317	4317




4	2016-02-19	12:51:12 pm	   SP     CFMS	     SP18	      SP18004319	4319





< b>我尝试了什么:



在表格中,我一直从sql中通过php代码获取表数据,并在收据列中获取数据,其中receipt = 4318失踪了。我从数据丢失的服务器获取数据..我只需要在丢失的收据列中增加一个而不影响任何其他列..这可能吗???谁能帮我吗??提前谢谢



What I have tried:

In the table I have been fetching table data from sql through php code and the data in receipt column where receipt=4318 is missing. Am getting the data from server where the data is missing already.. i just need an increment in the missing receipt column alone without affecting any other columns.. is this possible ??? can anyone help me out?? thanks in advance

推荐答案

这是你的另一个问题的转贴。在那里回答:你永远不想重复使用ID。如果删除一行,那么该ID就会消失,再次使用它是非常糟糕的做法。相反,如果您不想删除它,请添加名为deleted_time的字段并存储删除的时间。然后在检索数据时过滤掉那些。
This is a repost of your other question. As answered there: You don't ever want to reuse Ids. If you delete a row then that ID is gone and it is very bad practice to use it again. Instead, if you don't really want it deleted, add a field named deleted_time and store the time it is deleted. Then filter those out when retrieving your data.


这篇关于如何递增按顺序排列的列中的特定缺失值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆