Grouping FAQs From Database
I have a FAQ section on this website I'm developing that is *supposed* to pull data from three different tables: tblFAQ, tblAssignedPanels, and tblPanels.
In tblFAQ, there are 4 columns: faqID, panelID, question, and answer. The panelID links the FAQ with the associated panel in tblPanels based on the same field (panelID). tblPanels also holds the name of the panel that is associated w/ the ID. Code:
View Replies
ADVERTISEMENT
I am building an intranet web page using ASP that searches an Access DB. In the Database I have a field that contains dublicate words. For Ex.
[ SUBJECTS][ORG_LEVEL_1]
-------------------------------------
[Abuse ][Womens Abuse Society ]
[Abuse ][Childrens Abuse Center ]
[Baseball ][Newmarket Baseaball ***.]
When I do a search, My current Script shows the results just as it is shown there, what I would like is for it to show like this.
[Abuse ][Womens Abuse Society ]
[Childrens Abuse Center ]
[BaseBall ][Newmarket Baseball ***. ]
View Replies
View Related
I have an ASP project that I want to return grouped records from a SQL database.
The data fields are, for example:
Company = TEST, Portfolio = port1
Company = TEST2, Portfolio = port2
Company = TEST, Portfolio = port3
Company and Portfolio would be the fields in a table named "data".
What I need to do is display the results grouped by company.
For Example:
TEST -- port1 -- port3
TEST2 -- port2
I have not been able to get anywhere with this and hope someone can help. The only thing that got me remotely close was "GROUP BY" but it only works with one field. I need to return all of the data fields.
View Replies
View Related
I pull the data out from the sql db. There are quite a few records the same, but diff. ID. I would like to group them. How to do it?
For example: Here is what in the DB
01. English 101 - this is a night class
02. English 101 - this is a night class
0.3 English 101 - this is a night class
I would like it displays only - English 101 this is a night class.
View Replies
View Related
I am stumped as to how to do what appears to be a very simple thing.
Want to display the results of a query containing fields ID and Item,
grouped by the ID. I only want 1 instance of the ID to appear on the
page as a header for each group. There are 10 IDs in the query
results. Thought I could use <% Response.Write (rsName("Item")) WHERE
ID=1 %>, but doesn't work. How else could I accomplish this?
View Replies
View Related
I have the following query:
SELECT sponsor, COUNT(sponsor) * 2 AS total FROM Referrals GROUP BY sponsor
Works great, returns the sponsor and the total * 2 of their referrals because that's how much they make per referral. My problem is I need to pull more information from that table yet still maintain my grouping by sponsor. Every time I try to add another field, or even * like
SELECT *, sponsor, COUNT(sponsor) * 2 AS total FROM Referrals GROUP BY sponsor
it wants me to group on all of the fields and I only want to group on the sponsor. I'm not smart enough to know how to nest these or group part of it, etc. Hope I'm making sense.
View Replies
View Related
I have a list in a database that I have categorised using a category field. I now want to retrieve all records but grouped by categories.
how do i get my asp to loop through each category creating a recordset for each one rather than hard code a new recordset for each category i would rather it did it dynamically if thats possible ?
so eg
category travel
1 - B&B's records (recid 1)
2- rail info (recid 2)
category local info
1 - swimming baths (recid 3)
2 - museum info (recid 4)
View Replies
View Related
i'm trying to create a report in asp... and i want to group by months... for example
April
location1 $20,333
location2 $20,333
location2 $20,333
May
location1 $30,333
location2 $20,333
location2 $70,333
June
location1 $30,333
location2 $20,333
location2 $70,333
and i am pulling the date field... and example what that looks like it...
4/20/2004 12:00:00 AM
5/20/2004 12:00:00 AM
6/20/2004 12:00:00 AM
View Replies
View Related
I have a Table (Table-name:Problem_List) and Column (Column-name:Title). There are many records in this table with the same (or similar) titles. What i'm trying to achieve, is a list of this column, but instead of 2000 rows, I need the similar names counted list like this...
Blocker : (100)
Serious : (34)
Warning : (430)
etc.
Running: SQL 2000 on IIS6, using ASP
View Replies
View Related
I am writing a report using ASP and am having trouble displaying the data in the way i want. I'm collecting turnovers for various companies and each of the companies has a county code. e.g. Yorkshire is defined as number 2.
I need to group the companies together by county and need to display a totals line for those members only and then on the following lines I want the next county and its companies.
I can group the counties together but the totals line I'm displaying appears after each companies rather than after the group of companies for a given county.
I use a do while loop to check that there is data in the database for each company. I tried putting the totals line outside the loop and that only shows 1 totals line for ALL companies.
View Replies
View Related
I know that the sql 'group by' function exists but it's not working the way I want it to.
Brief background:
I'm making a report that displays, among other things,
-Project Name
-Project Number
-Project Manager
-Fiscal year total spending
My problem is, I cannot figure out how to group all my data together based on Project Number and Manager. Each project has several records for Fiscal Year total spending but the same information for project name, number, and manager.
For example, Project 1 called Test has Manager A and 19 enteries for Fiscal Year total spending (i.e. it's the past 19 year's worth of data).
The report includes a header section that lists the project name, project number, and manager. Below the header information is a list of the Fiscal year info. Code:
View Replies
View Related
I've got a lot of referer variables in my dbase and I'd like to have a query that groups them just by the domain. Everything up to the 3rd "/" should do it. So far, I'm using:
SELECT COUNT(id) AS clicktotal, ref
FROM clicklogs
GROUP BY ref
This only lists everything by the actual referring url. Is there a way to only have it group by the domain within the referring url?
View Replies
View Related
I have been playing around with two different ASP scripts,
1 - To display data from a table in columns
2 - To put the data in to categories.
1 - Columns
Code:
View Replies
View Related
I was wondering how some websites produce the paged numbers when displaying search results, so that if more than say 50 pages exist they group them.
For example:
Pages: 1 2 3 4 5 6 7 8 9 10 (10-20) 20-30)
Then when clicked say '10-20' the following would show:
(0-10) 11 12 13 14 15 16 17 18 19 20 (20-30)
Get the idea??
This looks a lot easier than a list of say 300 pages.
View Replies
View Related
I have an Access database with two fields that I would like to group by. The two fields are location and department. Field names are "Location" and "DeptName".
I have the code correct for grouping by location. That code looks like this: Code:
View Replies
View Related
I have just started using ASP, I am normaly using PHP but I thought ASP might be a good road to go down. I am having a few problems, I am trying to limit the number of records I take out the database but I keep getting errors.
<%
'connection string
datapath=Server.Mappath("guest.mdb")
strconn="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & datapath & ";"
Set CONN = Server.CreateObject("ADODB.Connection")
CONN.Open strconn
'select all records row by row
DBquery="SELECT * FROM Guests LIMIT 10"
set query=Conn.execute(DBquery)
do while not query.eof
'get a variable from the table
guest_id = query("ID")
guest_name = query("Name")
guest_msg = query("Mesg")
guest_date = query("DateTime")
'print the variable to the screen
response.write guest_id & "<br />"
response.write guest_name & "<br />"
response.write guest_msg & "<br />"
response.write guest_date & "<br />"
response.write "<br />"
'move to the next record
set conn = nothing
query.movenext
loop
%>
I am getting this error;
Microsoft JET Database Engine error '80040e14'
Syntax error in FROM clause.
/guestbook/guest.asp, line 11
can anyone help me?
View Replies
View Related
I had made a form name 'dform.html' which asks idno, name and phone from the user and after the user clicks on button "save data" sdata.asp is executed. sdata.asp is written to save the values entered for idno,name and phone in dform.html into table "myfriends" in the mydata.mdb (access database). but when i am clicking on save data button i am getting error saying
"Error Type:
Microsoft JET Database Engine (0x80040E09)
Cannot update. Database or object is read-only.
/SDATA.ASP, line 9"
can please anyone tell me why i am getting this error.
View Replies
View Related
I work with ASP for several weeks now and i really like it! But until now i have just used it in connection with my localhost. I made connections to a SQL Database and to an ACESS Database with using the ODBC Tool from WIndows!!
Now i want to publish my website but i don't know how to handle the connection string kind of thing. My MySQL-Database is on a different server than the website and i need a connection string where i can type in the server, a password and a username and it should then connect.
View Replies
View Related
I'm current working on a project which need to upload local data to
live server database.
Meanings that, i'm current having a server in my local mechine. I need
upload data from local database to live database which host at oversea
company. But i really have no idea how to do this in asp.
View Replies
View Related
Error Type:
Microsoft JET Database Engine (0x80040E21)
Cannot update. Database or object is read-only.
/q_maker/aero_admin/delete.asp, line 12
what is wrong! i checked the db and its not readonly.
View Replies
View Related
i wrote a shopping cart using cookies found out thatIE 7 won't let me add more cookies after a certian number. decided to use DB along with cookies and now i have very weired problem never encountered before Code:
View Replies
View Related
Products ---> Products|Customer <--Customer
With regardst the above many-to-many relationship:
Is there any advantage in creating seperate access databases for:
- Customer
- Products
....Rather than keeping them as three tables in one database.
The reason I ask is that I have found that if I am using a ftp approach to
overwriting or updating the remote database there are sometimes problems
with synchronizing data .....This seems to be a better solution?
Am I off base?
View Replies
View Related
does any one know a simple free database driven website tutorial that i could learn? i need it for when someone searches a name ionformation on that name comes up along with photographs realating to them.
I have built several websites before but none are database driven so is there any dummy proof versions?
View Replies
View Related
How do I do a Do While loop to display rows of information out of a database. Here's my code, and it seems like its in an infinite loop. Code:
View Replies
View Related
I have a Access DB with two tables (Users and tblpersons). Users are stored in table Users and their records in tblpersons. They are able to login, Enter, Search, Update their data.
I want users to be able to Enter and update only their data not other users data.
Example:User_Id 1 when logged in, is able to enter data for any user(1,2,3......) and able to modify their data.
View Replies
View Related
I can make a simple database file and name it database.mdb, all I need to do is name a single field email and save it. But I dont know how to make it so that my page will become active and the emails submitted will be saved either to the mdb file or a text file, im not sure what goes on there.
View Replies
View Related
i have 2 tables and i only want the records where which arent in the one database eg.
table 1
idnum
1
2
3
4
table two
idnum
1
2
3
4
5
6
out of these two tables i only want from table two idnum 5 and 6 cause they arnt in the 1st table.
View Replies
View Related
They are on Windows 2000 IIS 5.0 and currently have an older version
of their job database using Access hosted on a Brinkster server.
The new server that they are on, when I contacted the host, they advised me
against creating any new applications using Access, as the server is not meant
for multi-users.
So, I am thinking that they need to get their host to upgrade to a SQL database
and have the job database developed using that.
My question to this forum is: What do you think is the best combination for
improvement here, SQL or MySQL or what, considering that their site is using asp
and hosted on Win2000 IIS 5.0?
Also, any recommendations on scripts that might be already available that could
be customised to their site?
View Replies
View Related
What we have is our own (in house) Windows 2000 Server which runs MS SQL for our data storage and we have writen our own VB6.0 Application which runs of the SQL DB to manange our stock, ordering, price's etc etc. Also we have our own Website with a Web Hosting Company which is also a Windows 2000 Server but can only Run access databases.
What we what to do is somehow have the Access database and the SQL database sync together to have some of the same data in both database's. But I don't know where to start.
View Replies
View Related
I have the following code to execute a SQL query.Code:
SQL = "INSERT INTO teams (`teama`, `teamb`, `pot`, `winner`, `finished`, `start`) VALUES ('" & teama & "', '" & teamb & "', 0, '', False, '" & gdate & "')"
teamrs.Open SQL, conn
all works fine.
I just want to know what result it gives.because once i add it, the form submits, and its a blank page. I want it so it does this Code:
if sql = worked
redirect
else
error
end if
so how can i make sure the query was executed successfully.
View Replies
View Related
This is probably a stupid question (I'm good at those)...
I would like to enable a user to be able to browse to a picture on their local machine and upload that picture to a remote directory where it can then be displayed along with it's other pertinent data.
I thought it might be a good idea to use Front Page's "file upload" feature which includes a "browse" button and prompts me for a storing location - but I can't get it to work and am not even sure if that's its intended purpose.
So my question is two-part, what should my insert or update page look like regarding an upload process, and then how would I link to or display that picture?
View Replies
View Related
I have some questions in a database, i showed in the web page, for each questions i gave 3 (Yes, No, Not Applicable) options via select - option. when i get the variable with select name, it is showing with comma.
Example :
If they select for like that
Ist question - Yes
IInd question - No
IIIrd question - Yes
IVth question - Not applicable
The variable is coming like (Yes, No, Yes, Not applicable)
but i want to get with separate variables.
View Replies
View Related
What is the best database to connect to, and why?
View Replies
View Related