Guest User

Untitled

a guest
Jul 23rd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. <?php
  2. return $this->
  3. join(array(
  4. 'business_follower' => 'business_follower.business_id = notification.business_id',
  5. 'business' => 'business.business_id = notification.business_id'
  6. ), 'INNER JOIN')->
  7. selectFields(array(
  8. 'notification.dateline',
  9. 'notification.business_id',
  10. 'notification.message',
  11. 'business.logo_media_id'
  12. ))->
  13. where(array('business_follower.user_id' => $userId))->
  14. select()->
  15. run();
  16.  
  17.  
  18. return $this->runSql("
  19. SELECT
  20. notification.dateline,
  21. notification.business_id,
  22. notification.message,
  23. business.logo_media_id
  24. FROM
  25. notification
  26. INNER JOIN
  27. business_follower ON (business_follower.business_id = notification.business_id),
  28. business ON (business.business_id = notification.business_id)
  29. WHERE
  30. business_follower.user_id = " . $userId
  31. );
  32.  
  33. ?>
Add Comment
Please, Sign In to add comment