how to built a database for to sale online? [closed] - asp.net

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
well i have a table my boss has made... they are 2 tables..
first where products are going to be has
(table A)
idinvoice (since table B)
idpruduct
description (it is the name of product)
quantity
unitPrice
TotalPrice
another table (i am going to call it table B)
idinvoice
date
deadline
type
idclient
saler (i consider it is sooo bad)
street
transport
status
Total
why do i believe it is bad?
because first the client is going to choose the product (but it doesn't have a idinvoice)
i have never made something as this, only on windows form, but i have never built a online point sale,
how tables do you believe I must to have? (what columns)

You need three tables. They might be something like:
Product: idpruduct, description (it is the name of product), unitPrice
Client: idclient, street
Invoice: idinvoice, idclient, saler, plus everything else related to a shipment or sale of one or more products.
You might also want:
Saler, or salesman: name, idnumber (perhaps idclient, too)
Does this sound close to correct, to start with?

Related

SQL Statistical Analsis [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I am planning a "statistics" page for a university project where lots of factoids will be displayed based on data from my Access database.
The statistics will be displayed in text format like so:
23% of drinkers enjoyed Life of Pi whilst only 15% of non-drinkers like it.
65% of teachers have read Othello by William Shakespeare whilst only 40% of policemen have read it.
[I have bolded the values I know how to retrieve in an SQL statement, and have italicized the percentages which I don't know how to compute]
User details include Boolean values such as smoker:yes/no or drinker:yes/no as well as the user's profession (there will be a limited number of professions listed in a combobox). These are all stored in a table called 'userprofiles'
I have a separate table called 'booklist' that stores the names,authors,title etc of books as well as a table called 'booklikejunction' where the likes for each book are recorded as well as the user's current User.Identity.Name
What would my SQL statement look like? And how would I display the results of my query in the format I have outlined above?
Just a hint (using ms-access SQL syntax):
select sum(iif([field1]='drinker',1,0)) / count([field1])
from [tbl_questions]
where ...
Not the cleanest way to do it, but it works

add new field to the standard aspnet_Membership table [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have added a new field to the standard aspnet_Membership table.
Now that it's added, how do i get or set this field by UserId?
Delete, plese.(5-8-2013)
You should not change default membership table . Instead use profile fields. Following articles will help .
http://weblogs.asp.net/scottgu/archive/2005/10/18/427754.aspx
http://msdn.microsoft.com/en-us/library/2y3fs9xs.aspx
I don't recommend to use the profile features due it have a way too dirty to store the data. Only if you need just one or two more fields, it may have sense.
Anyway, you need to attempt to document yourself a little more before ask this kind of questions...

How to keep page view count? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
When I refresh the page, page count does not increase. It is kept in session or any way. For example, in SO, I clicked any qouestion, question view count increase. And I return that question again after look another it is not increase.
What is the logic? And Sorry my poor english. I hope I can explain. I dont know correct tag for this question too.
Thanks.
You may check the IPAddress of the request coming from and check it. If A request already came (page view) from this IP for this page, then do not increase the count, else increase.
If you store it in session it can be hacked by different browsers. Ex: If i open the page in 3 different browsers ,the count will be increased 3 numbers. So do not use Session for that.
You can have a table to do that. Have a QuestionId, IPAddress, DateVisited columns. It is up to you to decide whether the visit should be counted if user visit on a different day from the Same IP for same question . Since you have the data in table, you can do the IF condition as per your wish.

Search box to work like google search [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have a sql query that should return results for user text (Like free text search)which can be a single character or word or combination of words.
For example if I have column named "subject" and its value is Very long test, then I want a query that can give result if I put test or t or `e'in the query below
select Subject from [dbo].[Email] where Contains(Subject,'%usertext%')
I tried handling in code behind and then sending it to the query as parameter.
am editing this question because of so many down votes. Please if you dont understand the question simply comment so I can try to ask more clearly. That would be helping me.
You don't need the % character, since the function Contains already implied that.
So :
select Subject from [dbo].[Email] where Contains(Subject,'t')
The % are for LIKE function
select Subject from [dbo].[Email] where Subject LIKE '%t%'

ASP.NET web application taking a lot of time to Debug [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
Actually i have an web application where i have a form which takes data from MYSQL database where i have written an Sp to get the data from DataBase(compares 100.000 records and gives 40,000 of records as output) and bind it to Gridview. At the very first time it takes 15 mins to debug and den for second time(reload) it takes approx.1-2 hours(while i call the same SP in MYSQL DB it takes ~8 mins) Can any one please help me.
You are not going to show 40,000 records at once. You need to implement SP level pagination.
CREATE PROCEDURE OrdersByStatus(
IN orderStatus VARCHAR(25),
IN start INT, IN size, OUT total INT)
BEGIN
SELECT count(orderNumber)
INTO total
FROM orders
WHERE status = orderStatus;
SELECT *
FROM orders
WHERE status = orderStatus
LIMIT start, (start + size);
END$$

Resources