Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Date extraction of a months data at one go
Hello Everyone

THE STORY
In August last year I started to build a community website.  By November
I started to learn PHP in order to build an interactive section to deal
with the bookings for the Village Hall, I know I may be able to buy one,
but it's more fun to learn PHP etc.

THE INTRO
Now I'm really moving really slowly through a problem.  Part one of the
interactive booking site is a front end calendar and backend booking
engine to show when the hall is free.

Data is held in a MySQL table called calendar, the booking engine (yet to
be written) will take each booking and will see if the day exists, if it
does exist it will see it the time band is free and act accordingly
otherwise it will create the day and book the time band.

So, the first field is a unique index date field yyymmdd, followed by the
six available time bands (set to 0) which will one day hold the
customer's unique number and will give a pictorial overview (I hope.)
See http://www.hagleyvillage.org/hca_si..._diary_root.htm
for a mock-up of the desired finished product.

THE PROBLEM
To reduce processing time I wish to extract all entries for a given month
in date order before I print the results out (in date order) with
something along the lines of an if hall_8to12 > 0 echo BOOKED statement.

THE QUESTION
What SQL query do I get the data into the results array with?
$result = MYSQL_QUERY( "SELECT * FROM $table WHAT THE DEVIL GOES IN
HERE");?
My other variables are $dbdate which holds the date of the first day of
the month in SQL date format and $days_in_month which is self
explanatory.

Thanks for looking, I hope I've explained the problem clearly.

Nick
Email address is on the website.

Report this thread to moderator Post Follow-up to this message
Old Post
Busy
01-06-05 01:57 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP SQL archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:41 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.