[PHP] Logic Help please

2007-11-22 Thread Mohamed Jama
Hi, I am doing an online calendar for holiday application.

Now I got a table with these fields among many others.

  `req_id` int(11) NOT NULL auto_increment,
  `req_date` date NOT NULL,
  `username` varchar(100) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `days_off` int(11) NOT NULL,


With start_date is something like [ 1 - 10 - 2007 ] and end_date  is like [ 20 
- 10 -2007 ].

I am thinking whats the best way to present such data ? and how to show 
overlapping days between users ?


Thanks very much in advance



-Original Message-
From: Simeon F. Willbanks [mailto:[EMAIL PROTECTED] 
Sent: 22 November 2007 15:23
To: php-general@lists.php.net
Subject: Re: [PHP] Code Critique Please :)

No I did not, thanks!  For those that need more information, here is a  
good tutorial:

http://en.wikibooks.org/wiki/XML_-_Managing_Data_Exchange/Converting_MySQL_to_XML

Simeon

On Nov 22, 2007, at 10:05 AM, [EMAIL PROTECTED]  
wrote:

 You know that mysql has an output option for producing XML ?


 /Per Jessen, Zürich

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



Re: [PHP] Logic Help please

2007-11-22 Thread Richard Heyes

Hi, I am doing an online calendar for holiday application.

Now I got a table with these fields among many others.

  `req_id` int(11) NOT NULL auto_increment,
  `req_date` date NOT NULL,
  `username` varchar(100) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `days_off` int(11) NOT NULL,


With start_date is something like [ 1 - 10 - 2007 ] and end_date  is like [ 20 
- 10 -2007 ].

I am thinking whats the best way to present such data ? and how to show 
overlapping days between users ?


Something like:

  Jan  Feb
1 2 3 4  1 2 3 4 ...
   +
Richard|o o o o  o o o o
   Fred|x x o o  o o o o
Mohamed|o o o x  x o o o

With HTML you could use colours to represent days/weeks off making it 
more apparent, eg. nothing/white for no holiday booked, and red for one 
booked. And if you're going to go to the day granularity, an IFRAME 
might be needed with left/right scrolling.


--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

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