473,491 Members | 2,221 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Counting in Dynamic Tables

Hi,

I have a question that i think will be pretty easy for someone 'in the
know' to answer, but as of yet i have been unable to find anything on
google.
Basically, i have a page that is an overview of a shows reservations.
On it i have a dynamic table that shows all the nights in the system
for a particular show. I'd like one of the fields on each row of the
table to display the total of reservations made for that night. So each

row would display the total reservations (i.e. rows in the related
table) for the night it refers to, much like a message boards 'replies'

count.
Any help on this would be great, i've tried the count function but i
cant seem to get it to work with a dynamic 'Where = ' value. Perhaps
i'm doing something wrong.
All help much appreciated.
Thanks,
Gavin

Nov 8 '06 #1
1 970

Gavin wrote:
Hi,

I have a question that i think will be pretty easy for someone 'in the
know' to answer, but as of yet i have been unable to find anything on
google.
Basically, i have a page that is an overview of a shows reservations.
On it i have a dynamic table that shows all the nights in the system
for a particular show. I'd like one of the fields on each row of the
table to display the total of reservations made for that night. So each

row would display the total reservations (i.e. rows in the related
table) for the night it refers to, much like a message boards 'replies'

count.
Any help on this would be great, i've tried the count function but i
cant seem to get it to work with a dynamic 'Where = ' value. Perhaps
i'm doing something wrong.
All help much appreciated.
Thanks,
Gavin
let's suppose the table looks like this

reservations(reservation_id*,show,shownight)

SELECT `shownight` , `show` , count( `reservation_id` ) AS attendance
FROM reservations
WHERE shownight = '2006-11-09'
GROUP BY `show` , `shownight`
ORDER BY `show` , `attendance`;

Nov 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
17625
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
3
1951
by: Megan | last post by:
hi everybody- i'm having a counting problem i hope you guys and gals could give me some help with. i have a query that retrieves a bevy of information from several different tables. first let...
2
1283
by: MacKenzieMouse | last post by:
I have been struggling with creating dynamic tables populated with rows and cells the top row has one cell with a label the next row has four cells with a label each the last row has 4 cells...
7
1769
by: CanoeGuy | last post by:
I have been trying for the last two weeks to display a dynamic DataGrid. The data that I'm pulling from a SQL Server DB will have whole columns that will be either NULL or 0. I want to display...
13
17107
by: salad | last post by:
Operating in A97. I didn't receive much of a response conserning Pivot tables in Access. Pivot tables are nice, but a CrossTab will work for me too. Using a Pivot table, one is actually...
9
2918
by: pbd22 | last post by:
Hi. This is just a disaster management question. I am using XMLHTTP for the dynamic loading of content in a very crucial area of my web site. Same as an IFrame, but using XMLHTTP and a DIV. I...
0
1653
by: KA NMC | last post by:
I have a dataGrid that is populated by SQL table. The Datagrid has two dynamic columns - that I created to for calculations. I want to sort the grid on frmload by one of the dynamic columns is that...
3
18677
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
8
7090
by: crassostrea | last post by:
Hello and Happy New Year, I have two tables in Access 2003 (Windows XP) with similar, but different, information. We’ll call them table A and table B. I want to count the number of records in...
0
6978
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6858
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7360
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5451
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.