データベースに次のテーブルがあります
テーブル名は「product_question」
product_question_id int(11) No
product_id int(11) No
user_name varchar(100) No
user_email varchar(200) No
envipor varchar(100) No
company_name varchar(100) No
product_name varchar(100) No
question text No
product_image varchar(500) No
date timestamp No CURRENT_TIMESTAMP
そして私は次のSQL文を持っています
私の.phpページの文付きSQLは、それです
SELECT*
FROM product_question
WHERE company_name = $_SESSION['company_name']
しかし、私は.phpページの結果をこのように示す簡単なステートメントにしたい
product: xbox 360
question: what is the price? - user_name: brian
product: ps3
question: has availability? - user_name: carlos
product: xbox 360
question: has games? - michael
product: ps3
question: what is the price? - user_name: luke
product: smartphone
question : brings android? - selena
product: xbox 360
question: how many games? - user_name: daniel
文の結果がこのように表示されるようにしてほしい
製品: xbox 360
question: what is the price? - user_name: brian
question: has games? - michael
question: how many games? - user_name: daniel
製品: ps3
question: has availability? - user_name: carlos
question: what is the price? - user_name: luke
製品: スマートフォン
question : brings android? - selena
しかし、目的の結果を得るためにSQL文を作成する方法がわかりません。