Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. select histories.*, services.*, providers.name, califications.id as
  2. calification_id, califications.rating from histories
  3. left join califications on histories.id = califications.history_id
  4. inner join services on histories.service_id = services.id
  5. inner join providers on services.provider_id = providers.id
  6. where histories.user_id = ?
  7.  
  8. select histories.*, services.*, providers.name, providers.image,
  9. califications.id, califications.rating, promotions.discount from histories
  10. left join califications on califications.history_id = histories.id
  11. inner join services on histories.service_id = services.id
  12. inner join providers on services.provider_id = providers.id
  13. inner join promotions on promotions.provider_id = providers.id
  14. where histories.user_id = ?;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement