I am creating a simple one page blogger for page visitors to 'rant' so to speak... This is a remake of the old one and I've got about 49 pages of 5 entries each from the old one.
I need to make different dynamic pages using querystrings in the url which is simple enough. The page numbers are dynamic based upon totall records in the 'rants' table divided by 5 entries per page. Previously I've used a 'for next' statement nested in an 'if then' to actually go throuch each record and count it but it taxes the server while proccessing other parts of the page.
is there a SQL command that I can use for my ODBC connection to get the total number or rows in the 'rants' table?
For example: If I had a table with the headings ID Colour Car 1 Blue Volvo 2 Red Fiesta 3 Green Mondeo 4 Red Volvo 5 Red Fiesta 6 Blue Fiesta
How could I use asp to count how many times say the colour red appeared in the table displayed in a numeric value, i.e There are 4 red cars in the able
I need to count the number of rows in a table, and set the number to a variable so I can use it as a sentinel for a control loop . I know I'm supposed to use Count(*) but i'm not quite sure of the syntax. for i=1 to (the number of rows in the table) if breakloop=true then exit for (CODE) next .
I have been asked to design a page where users login. The users list is accessable from a drop down list which is taken from an SQL server table The user, when selected then click next to login to a page where their name, associated with thier username is displayed. Now I am a total newbie to this, can anyone guide me in the right direction?
Im trying to figure out how i can do the following:
I used a search script to select data from the database now each record has a figure such eg. £125.56 and so you can end up with rows like:
£125.56 £12.34 £.456.76
What I want to be able to do is have a select box to the right hand side where you select certain records and if possible at the bottom will have a live update showing the total of the selected items.
I am trying to add the price and shipping to equal the total price and display it in a table(receipt) I am able to get the price and shipping and handling to write to the page, but not sure how to add them together to get the total price:
The below code gives me $40.00$ 3.00 I want it to show as $43.00 ($40 + $3.00)if they ordered 500 business cards or $75.00 ($72 + $3.00)if they ordered 100 business cards.
<% quantity = Request.QueryString("quantity") If (quantity = "500") Then price = "$40.00" Else price = "$72.00" End If %> <% shipping = "$ 3.00" total = (price + shipping) %>
I have a column which i store my totals (price) and i want to sort the records by total. simple way of ordering as ORDER BY doesn't give correct solution since it sort according to the first number. like this:
I have an web application that allows a user to order items online. The user selects an item from a list on the order items page and enters the quantity. The quantity and unit price of the item is calculated on the order summary page. And than on the process order page, the calculated total from the order summary page is represented as the extended total for that item.
My problem is when that same user in a single user session orders another item, the extended total for the second item is not being added to the extended total of the first item. In other words, I would like to know the code to keep a running total for this user. I keep getting only the extended total for the current item exclusive of the previous item in that user session.
I need to be able to subtract the total quantity of a product when someone places an order. I'm trying to get my head around this; what's the strategy for doing something like this?
ASP SQL
So let's say I have a "Thank You" page at the end of the purchase. I have a table with a list of product Ids and a column of quantities left.
If I understand your post, I'm picturing this being a stored procedure that looks at the total quantities from my table that contains all the product quantities. Let's say product 1a has a quantity of 5 and product 2a has a quantity of 6.
A bit fuzzy here but what would a stored procedure look like that is able to update and step through all the items that were purchased?
I am using a select sum(tot_daily) as total hours ...it calculates the time incorretly... Example: ID | Tot_hrs | Person ---------------------- 1 5.45 A 2 5.45 A 3 5.45 A
The total hours should be 17 hours 15 mins...but the result comes as 16.35.... Is there a way to calculate it as 17.15 in db level in a select statement
i dont know if this should be a mysql question or a asp question...
i have a database that stores all the orders and each orders total. How can i make it so that i can add all the order totals together, to get a final total
i am developing a hosting directory web site on this site there will be the links of hosting websites, i want that when user click on a particular website link it will be recorded in the database how it could be done.
i have some problem in showing data. I have two tables . First table(containing Hosting categories). Second table(Containg catagories data like l,keyword,description.....etc). I want to display catgories names from first table and then diffrent catagories total records from second table, like this
ASP.NETHosting(10) Linux Hosting(20) Windows hosting(13) : : : etc
i need some help with my asp project. there few text field . for user to enter in amount. and i need the system to auto calculate the total everytime user finish enter amount in a text field. another problem is how can i make the text field accept number only?
is any on eone out there who can help me with my asp script. upto now i have managed create my database using MSaccess and connected my database to the web server. Code:
I fould this code on another page and have included it on may main page. I would like to know 2 things. How can i cange the database connection to DSN less and i would like to know how i can add code to get the total hits and add it to a Field called "totalhits" in my access database. Code:
Is there another way to count the records of an access database that have a specific field other than using a SELECT statement and a recordset to loop through the records?
I am using a lot ASP to manage a db for the students I work with in a YMCA program. What do I need to change to be able to count and print the # of records (like on a roster)
<% fp_sQry="SELECT * FROM Results WHERE (Grade = 'Senior') ORDER BY Club ASC" fp_sDefault="Club=" fp_sNoRecords="No records returned." fp_sDataConn="2004" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=125 fp_fTableFormat=True fp_fMenuFormat=False fp_sMenuChoice="" fp_sMenuValue="" fp_iDisplayCols=23 fp_fCustomQuery=True BOTID=0 fp_iRegion=BOTID %>
What is the best way to count how many times an image has been clicked? I have an image gallery on a site and want to count how many times each image has been clicked (clicking pulls up the full size image in a window) so that I know which are popular and which are not. I though about wimply adding an extra field to the database which serves up the image details, and incrementing a number by 1 each time a user clicks it just before the image is served up. What are the chances of this falling over if two people were to click the same image at the same time?
I need to find the total number of nodes in a binary tree structure ( Its for a mlm website), Also I need to count the total subnodes in leftside and right side separately.
Check the attachments, You will get the idea. Attachment contains database structure and Binary Tree Structure.
I have a access data base that has several records. One filed contains a category numbers. Many of the records have the same category number becase they belong to the same category. How can I get the number of records that have the same category number? or should I say how can I count the records wich have the same category number?