NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page whats wrong with this query?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 02-16-2007, 10:26 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
DylanButler's Avatar
Join Date: Jan 2006
Location: San Diego, CA
Posts: 735
DylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to behold
 



whats wrong with this query?


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 by DylanButler; 02-16-2007 at 10:34 PM.
DylanButler is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 02:56 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger