MYSQL显示单行结果

时间:2017-04-21 15:00:18

标签: mysql

message table

response table

抱歉,我的帐户是新的,因此我不允许上传两张以上的图片,所以this is the third image

MySQL查询:

SELECT  *,
        `message`.`status` as `message_status`,
        `message`.`id` as `message_id`
FROM    `message`
LEFT JOIN
        `pet_info`
ON      `pet_info`.`id` = `message`.`pet_id`
LEFT JOIN
        `response`
ON      `response`.`message_id` = `message`.`id`
WHERE   `user_id` = '1' AND
        `pet_id` = '6'

此查询显示超过2行。我想在一行中显示结果我该怎么做才能帮助我。

0 个答案:

没有答案