This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > November 2004 > Any SQL masters out there





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Any SQL masters out there
Tulsa

2004-11-16, 6:42 pm

This seems to be a very difficult sql statement to construct and any ideas or
help is appreciated. I have a table in Access that has a checkin date, checkout
date, room number, last name and first name, and yes/no checkbox for whether
the guest is a patient. I need to make an HTML table that displays the number
of guests checked in by floor per day and the number of patients per floor by
day. The first two digits of the room number designate the floor number(i.e.
2617 means the 26th floor). The output needs to look like this<BR><table border
= '1'> <tr><td colspan='3' align='center'>26th floor</td> <td colspan='2'>27th
floor</td> <td colspan='2'>28th floor</td> </tr> <tr> <th>Day</th>
<th>patients</th> <th>guests</th> <th>patients</th> <th>guests</th>
<th>patients</th> <th>guests</th> </tr> <tr> <td>1</td> <td>25</td> <td>43</td>
<td>21</td> <td>56</td> <td>19</td> <td>27</td></tr><tr> <td>2</td> <td>26</td>
<td>21</td> <td>68</td> <td>26</td> <td>26</td> <td>19</td> </tr> </table> I
thought about a recordcount for each floor, but I am not sure how to display
the day and then do it all in the same row for each floor. Thank you for help.

Richard B.

2004-11-16, 6:43 pm

Question: Why Access?

From what I understand there is an issue using Access. That issue is that if
Access is used in an environment where there are more than 6-8 users at a
time the system will faulter.

Most Web hosting companies provide MySQL, which is similiar to SQL in many
respects--(I've only worked with mysql so as to the differences I can't
say).

What you are trying to do is fairly simple--once you get a handle on
building databases. The thing to do is to normalize the tables (if you
haven't already). DW will assist you in creating the inquiries.

If you happen to be using PHP, I'd suggest getting a copy of "PHP Web
Development, Dreamweaver 2004," by Allan Kent and David Powers. It will give
you an excellent foundation to do what you are doing.


"Tulsa" <webforumsuser@macromedia.com> wrote in message
news:cmqqha$k7j$1@forums.macromedia.com...
> This seems to be a very difficult sql statement to construct and any ideas

or
> help is appreciated. I have a table in Access that has a checkin date,

checkout
> date, room number, last name and first name, and yes/no checkbox for

whether
> the guest is a patient. I need to make an HTML table that displays the

number
> of guests checked in by floor per day and the number of patients per floor

by
> day. The first two digits of the room number designate the floor

number(i.e.
> 2617 means the 26th floor). The output needs to look like this<BR><table

border
> = '1'> <tr><td colspan='3' align='center'>26th floor</td> <td

colspan='2'>27th
> floor</td> <td colspan='2'>28th floor</td> </tr> <tr> <th>Day</th>
> <th>patients</th> <th>guests</th> <th>patients</th> <th>guests</th>
> <th>patients</th> <th>guests</th> </tr> <tr> <td>1</td> <td>25</td>

<td>43</td>
> <td>21</td> <td>56</td> <td>19</td> <td>27</td></tr><tr> <td>2</td>

<td>26</td>
> <td>21</td> <td>68</td> <td>26</td> <td>26</td> <td>19</td> </tr> </table>

I
> thought about a recordcount for each floor, but I am not sure how to

display
> the day and then do it all in the same row for each floor. Thank you for

help.
>



Les Matthews

2004-11-16, 6:43 pm

It's made a little more complex because you want to display two days per
row.
Use a nested repeat region and a horizontal looper.
The primary repeat region retrieves the floors and the nested repeat region
displays the information pertaining to the floor (i.e. patients and guests).
This would be simple if you didn't have to display two days of data in the
same TR.

"Tulsa" <webforumsuser@macromedia.com> wrote in message
news:cmqqha$k7j$1@forums.macromedia.com...
> This seems to be a very difficult sql statement to construct and any ideas
> or
> help is appreciated. I have a table in Access that has a checkin date,
> checkout
> date, room number, last name and first name, and yes/no checkbox for
> whether
> the guest is a patient. I need to make an HTML table that displays the
> number
> of guests checked in by floor per day and the number of patients per floor
> by
> day. The first two digits of the room number designate the floor
> number(i.e.
> 2617 means the 26th floor). The output needs to look like this<BR><table
> border
> = '1'> <tr><td colspan='3' align='center'>26th floor</td> <td
> colspan='2'>27th
> floor</td> <td colspan='2'>28th floor</td> </tr> <tr> <th>Day</th>
> <th>patients</th> <th>guests</th> <th>patients</th> <th>guests</th>
> <th>patients</th> <th>guests</th> </tr> <tr> <td>1</td> <td>25</td>
> <td>43</td>
> <td>21</td> <td>56</td> <td>19</td> <td>27</td></tr><tr> <td>2</td>
> <td>26</td>
> <td>21</td> <td>68</td> <td>26</td> <td>26</td> <td>19</td> </tr> </table>
> I
> thought about a recordcount for each floor, but I am not sure how to
> display
> the day and then do it all in the same row for each floor. Thank you for
> help.
>



Tulsa

2004-11-16, 6:43 pm

I might have made the table wrong. There is only one day per row, with each floor's guest count on that row. What did you have in mind for this? Thanks
Les Matthews

2004-11-16, 6:44 pm

A nested repeat region will give you output like below.

26th Floor
Day 1 26 patients 12 guests
Day 2 17 patients 11 guests
Day 3 20 patients 9 guests
27th Floor
Day 1 12 patients 6 guests
Day 2 11 patients 12 guests
Day 3 9 patients 7 guests
28th Floor
....

I don't know what server model you are using, but here are some instructions
on how to do it with ASP:
http://www.dmxzone.com/showDetail.a...Id=2&NewsId=394


"Tulsa" <webforumsuser@macromedia.com> wrote in message
news:cmr9fo$8cm$1@forums.macromedia.com...
>I might have made the table wrong. There is only one day per row, with
>each floor's guest count on that row. What did you have in mind for this?
>Thanks



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews