Skip to content

Instantly share code, notes, and snippets.

@astrotars
Created November 29, 2012 21:07
Show Gist options
  • Select an option

  • Save astrotars/4171935 to your computer and use it in GitHub Desktop.

Select an option

Save astrotars/4171935 to your computer and use it in GitHub Desktop.
ORM::for_table('orders')
->select('users.fb_uid')
->select('order_items.quantity')
->join('users', array('users.id', '=', 'orders.user_id'))
->join('user_settings', 'user_settings.user_id', '=', 'orders.user_id')
->join('order_items', 'order_items.order_id', '=', 'orders.id')
->where('order_items.deleted', false)
->where('user_settings.store_id', $store_id)
->find_many();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment