close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

help with recordset join

Thread began 4/01/2010 8:07 pm by aaron5263 | Last modified 4/07/2010 4:11 pm by Jason Byrnes | 947 views | 6 replies |

aaron5263

help with recordset join

Need a little help with a recordset query. I have 2 tables and want to search both of them.
table1 is my sales table (each order is a row in this table)
The orderID is Primary key.

table 2 is my sales_detail table (each item in the shopping cart is a row in this table)
The foreign key references the orderID in the sales table.

I have done an inner join between the two tables.

I then want to do a search on both tables. But the results always show me every line in the sales details table. so i end up with duplicate information in the recordset results once the search is done.

How do i show only 1 row for each order without the duplicate info?

Sign in to reply to this post

Jason ByrnesWebAssist

It sounds like your search isn't filtering the recordset. can you send a copy of the page so I can have a look at the code? is it possible to send a link so I can see the results?

Sign in to reply to this post

aaron5263

here is my sql

SELECT SaleDetails.cart_1, SaleDetails.cart_2, SaleDetails.cart_3, SaleDetails.SKU_Item#, SaleDetails.Title, SaleDetails.Qty, SaleDetails.cart_4, SaleDetails.cart_5, SaleDetails.cart_6, SaleDetails.cart_7, SaleDetails.cart_8, SaleDetails.cart_9, SaleDetails.cart_10, SaleDetails.cart_11, SaleDetails.cart_12, Sales.Invoice, Sales.Checkout_Date, Sales.Total_Invoice_Amt, Sales.Order_ID, Sales.Billing_First_Name, Sales.Billing_Last_Name, Sales.Billing_Address, Sales.Billing_City, Sales.Billing_State_Region, Sales.Billing_Zip, Sales.Billing_Country, Sales.Billing_Day_Phone, Sales.Billing_Eve_Phone, Sales.Marketplace_Email, Sales.marketplace_user_ID, Sales.cart_total, Sales.order_notes, Sales.Auction_Id, Sales.Shipping_First_Name, Sales.Shipping_Last_Name, Sales.Shipping_Address, Sales.Shipping_City, Sales.Shipping_State_Region, Sales.Shipping_Zip, Sales.Shipping_Country
FROM (Sales
INNER JOIN SaleDetails ON SaleDetails.SaleID=Sales.Order_ID)
ORDER BY Sales.Checkout_Date DESC

Sign in to reply to this post

aaron5263

basically what i want to do is search the sales table and the sales detail table together. but when the search results are displayed i only want to show 1 row for each sale. right now i get duplicate info depending on how many products the person bought.

The sales table has OrderID primary key and the customers name, address etc.

the sales_detail table has SaleID as foreign key to primary sales OrderID table.

Sign in to reply to this post

aaron5263

jason are you there? How do i securely pass you code?

Sign in to reply to this post

aaron5263

Anyone out there that can help me figure out how filtering works?

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
login.php

Sign in to reply to this post

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...