-3

The difference of two date values ​​that are stored in the table is calculated and brought to the next column. My SQl Command Here

UPDATE skuser SET count_day=date-paydate WHEREisactive=0

  • What's the problem with that code? Also, how is this related to PHP? – Nico Haase May 03 '21 at 14:44
  • Does this answer your question? [How to get the number of days of difference between two dates on mysql?](https://stackoverflow.com/questions/2490173/how-to-get-the-number-of-days-of-difference-between-two-dates-on-mysql) – El_Vanja May 03 '21 at 14:45
  • Welcome to Stack Overflow. I'd highly recommend reading [how to ask](https://stackoverflow.com/help/how-to-ask) for some pointers on how questions should be constructed. – El_Vanja May 03 '21 at 14:45
  • Please add all clarification to your question in readable form. There's no need to use images – Nico Haase May 03 '21 at 15:34
  • Please also add a question to your question, such that others know what kind of help you are looking for – Nico Haase May 03 '21 at 15:54

1 Answers1

0

UPDATE skuser SET count_day=timestampdiff(day,date,paydate) WHEREisactive=1

  • Please add some explanation to your answer such that others can learn from it – Nico Haase May 04 '21 at 05:20
  • The difference of two date values that are stored in mysql db. one field name date and second field paydate i use this code to calculate my countday in third field as per below this code UPDATE skuser SET count_day = timestampdiff (day, date, paydate) WHEREisactive = 1 – Surjeet Kumar May 04 '21 at 16:10
  • Please add all explanation **to your answer** by editing it – Nico Haase May 04 '21 at 16:18