Dynadot โ€” .com Transfer

What's wrong with this query?

NamecheapNamecheap
Watch
Impact
38
I am trying to get all orders associated to a user with a unique $brokerid.
There are three tables to be pulled from (dates, order, sales) and the user information is stored in table users.

Order holds the primary key `id` and dates / sales contain the foreign key `id` to match.


RESOLVED.

SELECT DISTINCT o.id, o.status, d.submitdate, s.paymentstatus
FROM `order` AS o, `dates` AS d, `sales` AS s, `users` AS u
WHERE (
u.userid = o.broker
) && ( u.userid =2 ) && ( o.broker =2 ) && ( s.id = o.id ) && ( d.id = o.id )
ORDER BY `d`.`submitdate` DESC
LIMIT 0 , 30
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Spaceship
Domain Recover
CatchDoms
DomainEasy โ€” Live Options
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back