select from one table, count from another where id's linked

后端 未结 2 360
青春惊慌失措
青春惊慌失措 2020-12-08 22:14

heres my code:

$sql = mysql_query(\"select c.name, c.address, c.postcode, c.dob, c.mobile, c.email, 
                    count(select * from bookings where b         


        
2条回答
  •  执笔经年
    2020-12-08 22:40

    Try changing the likes of...

    count(select * from bookings where b.id_customer = c.id)
    

    ...to...

    (select count(*) from bookings where b.id_customer = c.id)
    

提交回复
热议问题