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.