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