Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

Re: FN-FORUM: mysql!

date posted 30th May 2006 18:08

ok here are the two tables

table 1 - times

time_id (auto)
time_set ( the time of day available)
time_type (0 - weekday , 1 = weekend)


table 2 = bookings

book_id (auto)
book_date (date stamp)
time_id (time of booking)
payment_id (payment stuff_
c_id (customer id)


ok so i want to LIST all the times from the time table!

if the time exists in the booking table for that date i want i want it to
say booked next to the time in the list.

i did it a really crude way but was having no joy.. i created an array from
a query on the booking table. then in a while loop for the times table to
display resluts an inarray check to see if it existed in the array. if it
did i got it to output booked!! but i was having some problems.. maybe i
could do this in a JOIN with some condinials??

example of out put i want

TIME availability

11.00am booked
12.00pm available - click here

----- Original Message -----
From: "Tom Allen" [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Tuesday, May 30, 2006 7:00 PM
Subject: Re: FN-FORUM: mysql!


>
>> i have 2 TABLES both contain a value :
>>
>> if this value exists in both tables i dont want it to return the value
>> in
>> the query.... i want to loop through all results and display them?
>>
>> any ideas!? do i need ot do a join or maybe i need a function for this!>
>
> Can you be a little more specific? What are the columns in each
> table? What is your current query?
>
> --
> Freelancers, contractors earn more with Prosperity4
> Call 0870 870 4414 or visit www.prosperity4.com
> and benefit from Inland Revenue approved expenses today.
>
> To advertise here: http://www.freelancers.net/advertising.html
>
>



Messages by Day
May 31st 2006
May 30th 2006
May 29th 2006
May 28th 2006
May 27th 2006
May 26th 2006
May 25th 2006
May 24th 2006
May 23rd 2006
May 22nd 2006
May 21st 2006
May 20th 2006
May 19th 2006
May 18th 2006
May 17th 2006
May 16th 2006
May 15th 2006
May 14th 2006
May 13th 2006
May 12th 2006
May 11th 2006
May 10th 2006
May 9th 2006
May 8th 2006
May 7th 2006
May 6th 2006
May 5th 2006
May 4th 2006
May 3rd 2006
May 2nd 2006
May 1st 2006


Messages by Month
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
March 2006
January 2006


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000