CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Ohhh, grid,grid please help

Print topic Send  topic

Author Message
rado

Posts: 221
Posted: 11/01/2008, 12:06 PM




TABLES

APPARTMENTS
___________________
| app_id | app_number |
| 1 | 100 |
| 2 | 200 |
| 3 | 300 |


ROOMS
_________________________________
| room_id | app_number | room_number |
| 1 | 100 | 1 |
| 2 | 100 | 2 |
| 3 | 100 | 3 |
| 4 | 200 | 1 |
| 5 | 200 | 2 |
| 6 | 200 | 3 |
| 7 | 200 | 4 |
| 8 | 200 | 5 |
| 9 | 300 | 1 |
| 10 | 300 | 2 |
| 11 | 300 | 3 |




ROOM_EVENT
_______________________________________
| room_event_id | room_id | room_status |
| 1 | 1 | available |
| 2 | 2 | available |
| 3 | 3 | available |
| 4 | 4 | available |
| 5 | 5 | reserved |
| 6 | 6 | reserved |
| 7 | 7 | occupated |
| 8 | 8 | occupated |
| 9 | 9 | reserved |
| 10 | 10 | occupated |
| 11 | 11 | occupated |


I would like to make the grid that will have "app_number" and available "room_number"'s for that appartment in the header. In the second rows I would like to have the statuses of available rooms from header.
_______________________________________________________________________
|app_number <room_number> <room_number> <room_number> <room_number>|
|Status <room_status> <room_status> <room_status> <room_status |

Examples:

_________________________________________
| 100 1 2 3 |
|Status available available available |

__________________________________________________________
| 200 1 2 3 4 5 |
|Status available reserved reserved occupated occupated |

_________________________________________
| 300 1 2 3 |
|Status reserved occupated occupated |

Thank you very much for any suggestion.

By the way, can I insert the picture here in the post.

Rado
View profile  Send private message
datadoit
Posted: 11/02/2008, 7:01 AM

Go look at the Report Builder instead of the Grid Builder. Should
accomplish what you need.
rado

Posts: 221
Posted: 11/02/2008, 7:09 AM

Thanks, I'm just about it. I'm not sure that I can get what I need since I have to use 3 tables but I will try. Do you know can I use more then one table by default?

Thanks again,

Rado
View profile  Send private message
tallmik

Posts: 23
Posted: 11/02/2008, 11:38 AM

If you are using MySql 5+... you can use views... I find that often i need a similar join in several places in an application, so i construct those as views in the db... then just treat the view as a table. No problem with complex *many* table joins.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.