Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select histories.*, services.*, providers.name, califications.id as
- calification_id, califications.rating from histories
- left join califications on histories.id = califications.history_id
- inner join services on histories.service_id = services.id
- inner join providers on services.provider_id = providers.id
- where histories.user_id = ?
- select histories.*, services.*, providers.name, providers.image,
- califications.id, califications.rating, promotions.discount from histories
- left join califications on califications.history_id = histories.id
- inner join services on histories.service_id = services.id
- inner join providers on services.provider_id = providers.id
- inner join promotions on promotions.provider_id = providers.id
- where histories.user_id = ?;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement