Skip to content
Advertisement

Tag: select

show difference between of two price list

I have history list of product price(order by created_at) like this: Now for show data in table I listed price using foreach method like this: I can see true output in table but I need to show difference between of two price in the third column like this picture: how do can i show difference between of two price in

Show a text depending on the value of a column MySQL

I would like to know, how can I build a query that shows me an extra column where instead of showing the true value of the original column it shows me the text that i want? For example, The Column, in this case “inputOutput”, save values ​​0 or 1, and I would like to show in a query that if

Advertisement