Re: Displaying information from table graphically

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21 Nov 2008, at 17:55, dzenan.causevic@xxxxxxxxxx wrote:
I have a PHP application that accesses data from MySQL. There is table
called "rooms", and table called "beds". There is another table called
"patients". Patients are being placed into beds, and beds are in the
rooms. PHP application currently displays all information in textual mode via regular HTML tags. But I would like to have that information displayed
in graphical mode instead of textual mode.

Is there a way to display this information from the database graphically.
Graphic would represent a room, and it would contain beds inside. You
would be able to see visually which beds are occupied and which are free
by looking at the graphics.

User of the system wants pictures instead of text displayed via HTML
tables as a list of entries.

There's a couple of ways you can do this with differing qualities.

1) Use GD or ImageMagick to composite images together to represent the room. This would allow you to create the best looking images. You can either store images for rooms with 1, 2, 3, 4, ..., n beds and overlay markers to indicate occupied beds, or you could composite the whole thing.

2) Slice images up such that you can build a room using positioned divs. This would be a lot easier but you'd be limited in what type of textures and looks you can give the rooms. On the other hand this could turn out to be more flexible as you could arrange it to allow rooms of any dimensions with any number of beds.

Personally I'd opt for 2 based on the KISS principle, but you could potentially run into browser compatibility issues depending on your target platforms.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux