Click here to Skip to main content
15,914,066 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to display orders based on the day the user has ordered and the user registered date if both the dates are same then the orders should be display based on the two dates for a e-commerce site.
i had given 3 tables to use from the database
membership table, account table, and order table.
membership table contains

[UserId]
,[Password]
,[PasswordFormat]
,[PasswordSalt]
,[MobilePIN]
,[Email]
,[LoweredEmail]
,[PasswordQuestion]
,[PasswordAnswer]
,[IsApproved]
,[IsLockedOut]
,[CreateDate]
,[LastLoginDate]
,[LastPasswordChangedDate]
,[LastLockoutDate]
,[FailedPasswordAttemptCount]
,[FailedPasswordAttemptWindowStart]
,[FailedPasswordAnswerAttemptCount]
,[FailedPasswordAnswerAttemptWindowStart]
,[Comment]
Acount table contains

[UserId]
,[FirstName]
,[LastName]
,[Email]
,[ContactNumber]
,[DOB]
,[Note]

order table contains

[OrderId]
,[UserId]
,[OrderPlaced]
,[Paid]
,[DatePaid]
,[PaymentMethod]
,[PaymentRef]
,[BillTo]
,[AddressLine1]
,[AddressLine2]
,[City]
,[County]
,[CountryId]
,[PostCode]
,[Shipped]
,[DateShipped]
,[Packing]
,[ShipTo]
,[ShippingAddressLine1]
,[ShippingAddressLine2]
,[ShippingCity]
,[ShippingCounty]
,[ShippingCountryId]
,[ShippingPostCode]
,[ShippingCost]
,[ShippingOptionId]
,[AllocatedPoint]
,[PointValue]
,[PromoCode]
,[DiscountValue]
,[InvoiceNumber]
,[IPAddress]
,[StatusCode]
,[IssueCode]
,[USStateId]
,[ShippingUSStateId]
,[CurrencyCode]
,[ExchangeRate]
,[LastActivityDate]
,[AwardedPoint]
,[Archived]
,[LastAlertDate]
can anyone help me to how to write a code for this iam a fresher.
Posted
Comments
DarkDreamer08 12-Aug-14 23:25pm    
You should have a relationship between the tables for you to be able display the orders. I think you could connect them by joining the tables. Read articles about joining tables. Another thing, what database are you using? Your question is more related to database not asp.net.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900