Re: Displaying information from table graphically

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

 



Please keep the discussion on-list.

On 22 Nov 2008, at 13:40, dzenan.causevic@xxxxxxxxxx wrote:
The second approach is I believe exactly what I need. I dont actually have
to make sophisticated graphics at all. Just a simple graphical
representation of a room and beds inside in different colors indicating whether they are occupied, free, or reserved. So I believe <DIV>s would be
definitelly the right approach for the scope of this project.

Now the question would be how DIV's are supported by IE and Mozzila
Firefox (I could specify this as a restriction in terms of usage)

You should be fine with any Firefox and IE7, but you may have issues with IE6. Best advice is to test everything thoroughly.

I'll probably get lynched for saying this, but you could avoid most compatibility issues by using a table to put the images together instead of divs.

Also what does the KISS principle mentioned below stands for please?

KISS === Keep It Simple, Stupid

http://en.wikipedia.org/wiki/KISS_principle

-Stut

--
http://stut.net/

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





--
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