View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Help with Recordset SQL

Thread began 8/21/2009 10:33 pm by 4egidio363291 | Last modified 8/24/2009 4:20 pm by 4egidio363291 | 848 views | 3 replies

4egidio363291

Help with Recordset SQL

I am trying to join tables for a recordset and I can't get it to work. Can someone take a stab at it? Racking my brain. Thanks

SELECT *
FROM OrderDetails LEFT JOIN Orders ON OrderDetails.DetailsOrderID = Orders.OrderReferenceID JOIN Users ON OrderDetails.UserEmail = Users.UserEmail
WHERE OrderDetails.Platform = 'Nintendo DS' AND Orders.status = '1'

CREATE TABLE `Orders` (
`OrderID` int(11) NOT NULL auto_increment,
`OrderReferenceID` varchar(100) collate latin1_german2_ci NOT NULL,
`OrderUserID` int(100) NOT NULL,
`OrderShipping` varchar(100) collate latin1_german2_ci NOT NULL,
`OrderTax` varchar(100) collate latin1_german2_ci NOT NULL,
`OrderTotal` varchar(100) collate latin1_german2_ci NOT NULL,
`UserEmail` varchar(255) collate latin1_german2_ci NOT NULL,
`status` varchar(255) collate latin1_german2_ci NOT NULL,
PRIMARY KEY (`OrderID`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci AUTO_INCREMENT=3 ;

CREATE TABLE `Users` (
`UserID` int(11) NOT NULL auto_increment,
`UserFirstName` varchar(100) collate latin1_german2_ci NOT NULL,
`UserLastName` varchar(100) collate latin1_german2_ci NOT NULL,
`UserAddress` varchar(255) collate latin1_german2_ci NOT NULL,
`UserCity` varchar(255) collate latin1_german2_ci NOT NULL,
`UserState` varchar(255) collate latin1_german2_ci NOT NULL,
`UserZip` varchar(255) collate latin1_german2_ci NOT NULL,
`UserPassword` varchar(100) collate latin1_german2_ci NOT NULL,
`UserEmail` varchar(100) collate latin1_german2_ci default NULL,
PRIMARY KEY (`UserID`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci AUTO_INCREMENT=12 ;

CREATE TABLE `OrderDetails` (
`DetailsID` int(11) NOT NULL auto_increment,
`DetailsOrderID` varchar(100) collate latin1_german2_ci NOT NULL,
`DetailsProductID` varchar(100) collate latin1_german2_ci NOT NULL,
`DetailsProductName` varchar(100) collate latin1_german2_ci NOT NULL,
`DetailQuantity` varchar(100) collate latin1_german2_ci NOT NULL,
`DetailPrice` varchar(100) collate latin1_german2_ci NOT NULL,
`DetailOption1` varchar(100) collate latin1_german2_ci NOT NULL,
`DetailOption2` varchar(100) collate latin1_german2_ci NOT NULL,
`UserFirstName` varchar(100) collate latin1_german2_ci NOT NULL,
`UserLastName` varchar(100) collate latin1_german2_ci NOT NULL,
`Platform` varchar(100) collate latin1_german2_ci NOT NULL,
`Title` varchar(100) collate latin1_german2_ci NOT NULL,
`GameCondition` varchar(255) collate latin1_german2_ci NOT NULL,
`Condition` varchar(255) collate latin1_german2_ci NOT NULL,
`Description` varchar(100) collate latin1_german2_ci NOT NULL,
`New` varchar(100) collate latin1_german2_ci NOT NULL,
`CaseWithInstructions` varchar(100) collate latin1_german2_ci NOT NULL,
`CaseWithoutInstructions` varchar(100) collate latin1_german2_ci NOT NULL,
`UserCity` varchar(100) collate latin1_german2_ci NOT NULL,
`UserState` varchar(100) collate latin1_german2_ci NOT NULL,
`UserEmail` varchar(255) collate latin1_german2_ci default NULL,
`Comments` varchar(100) collate latin1_german2_ci NOT NULL,
`ListPrice` varchar(100) collate latin1_german2_ci NOT NULL,
`UserZip` varchar(100) collate latin1_german2_ci NOT NULL,
`img_thumb` varchar(255) collate latin1_german2_ci NOT NULL,
`img_cover` varchar(255) collate latin1_german2_ci NOT NULL,
`BuySell` varchar(10) collate latin1_german2_ci default NULL,
PRIMARY KEY (`DetailsID`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci AUTO_INCREMENT=3 ;

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...