I’m using asp code i.e classic ASP and SQL server 2000 in this process to display records from database into a table.
I have two links called week-wise and month-wise .
when the user clicks on this link he will see the data week-wise or month-wise assuming the database have a date field which stores all the dates, when the record is inserted.
So far i’m able to display records present in the table for that particular user. How can i display his/her records WEEK or MONTH wise.
this is the query that I have use
<%
sql="select SUM(grand_total) as total from order_details where emp_number='"&request.QueryString("no")&"'"
rs.open sql,con,1,2
do while not rs.eof
rs.movenext
loop
rs.close
%>
this particular query displays records of that particular result…
And I’d consider using Prepared Statements to prevent SQL injection.