Had to make a few edits, but it works as needed. THANK YOU!!!! THANK YOU!!!!
select b.*, e.*
FROM eventbooking_bookings e
JOIN eventbooking_events b ON e.event_id = b.id
AND e.applicant_id = 168
AND b.calendarid = 1
AND b.dt > NOW()
Frustrated newbie..... searched for examples and still have not been able to get the results needed.
Basically I have these two tables…..
eventbooking_bookings
id, applicant_id, event_id
eventbooking_events
id, calendarid, dt
I need to select dt when searching for an applicant_id from bookings
where
eventbooking_events.id = eventbooking_bookings.event_id
and
eventbooking_events.dt is greater than today
and
eventbooking_events.calendarid = 1
Any help would be greatly appreciated.
Greg.
[quote author=FrOzeN link=topic=110050.msg444209#msg444209 date=1159622891] Preferably, I'd do something like this: [b]common_html.php[/b]: [code]<?php function addHeader($title) { ?> <html> <head> <title><?php echo $title; ?></title> <!-- etc.. --> <?php } function addBody() { ?> <body> <!-- etc.. --> <?php } ?>[/code] Eg, [b]index.php[/b]: [code]<?php include 'common_html.php'; addHeader("Home page"); echo "Some other stuff to go on the header\n</head>"; addBody(); echo "Some stuff to go on the homepage!\n</body>\n</html>"; ?>[/code] [/quote] Understood. I think this is the approach I am looking for. Thanks! :-)
[quote author=vbnullchar link=topic=110050.msg444178#msg444178 date=1159613027] its possible, but why would u do that... I suggest that you go for a template page ex.. <html> <head><title>{title}</title></head> </html> then just replace {title} with the title of the the current page [/quote] My idea was to have all common html code in a database so that when a change needs to be made, I change it once in the database so that all subdomain websites are updated at once. Using a template would mean me changing the common html in all subdomains.
Is it possible to contain all html code in a mysql database? Then use only php to build the web pages? I need to create 15 subdomains that have common html code. Only a few changes exists between the subdomains. I would like to make it easy in making changes to all common code between subdomains by having a common table in the database, then have a record for each subdomain that contains the differences. Is this something I can accomplish with php and mysql? Thanks in advance.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.