Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
mattmanser
on Nov 17, 2014
|
parent
|
context
|
favorite
| on:
Some REST best practices
No. Think of it as "for order 1 list all clients", so it would be:
SELECT * FROM clients WHERE client_id IN (SELECT client_id FROM orders WHERE order_id = @order_id)
The GET /clients/1/orders is what would result in your query (for client 1 list all orders).
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: