Performing simple arithmetic in MySQL statement or in PHP code

后端 未结 5 1569
野性不改
野性不改 2020-12-21 07:47

For instance, say I have a data structure with two integer columns start and end, but I\'m actually interested in the start and difference between

5条回答
  •  猫巷女王i
    2020-12-21 08:40

    For simple operations I would use MYSQL. I'm not a guru, but I like to keep things as simple and clean as posible so where it is possible I use MYSQL built-in functions to do the stuff that can be done with php. In other words - using MYSQL would lower the amount of code and formatting necessary to display the data.

提交回复
热议问题