Display different values in the same data table?

SELECT * FROM `user_cart` as c
        JOIN
          `product` AS b ON c.prod_id = b.prod_id
        WHERE
          c.id = "{$_SESSION["user-id"]}"

I have a value in product called from, which is either an or b
, but what is shown now is that as long as the id matches, it will all be displayed

.
while($row = mysqli_fetch_array($data)){
....
}

but what I want to score now is
if the threshold from value is a, then it is shown in the upper part
if the from is b, it is shown in the lower half?

Mar.24,2021

I find that you have asked such questions many times, but you can find answers to these questions in the documentation. I suggest you take a good look at the documentation first.


query and then group or try group

Menu