[PHP-DB] DATETIME Query
Hi, I have a table called Bookings which has two important columns; Booking_Start_Date and Booking_End_Date. These columns are both of type DATETIME. The following query calculates how many hours are available between the hours of 09.00 and 17.30 so a user can see at a glance how many hours they have unbooked on a particular day (i.e. 8.5 hours less the time of any bookings on that day). However, when a booking spans more than one day the query doesn't work, for example if a user has a booking that starts on day one at 09.00 and ends at 14.30 on the next day, the query returns 3.5 hours for both days. Any help here would be greatly appreciated. SELECT 8.5 - (SUM(((DATE_FORMAT(B.Booking_End_Date, '%k') * 60 ) + DATE_FORMAT(B.Booking_End_Date, '%i')) - ((DATE_FORMAT(B.Booking_Start_Date, '%k') * 60 ) + DATE_FORMAT(B.Booking_Start_Date, '%i'))) / 60) AS Available_Hours FROM WMS_Bookings B WHERE B.User_ID = '16' AND B.Booking_Status <> '1' AND NOT ( '2003-10-07' < DATE_FORMAT(Booking_Start_Date, "%Y-%m-%d") OR '2003-10-07' > DATE_FORMAT(Booking_End_Date, "%Y-%m-%d") ) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] support to palm db
Hi... php have PalmDB(.pdb) extensions ? if not, have plans to implement in future versions ? thanks Cesar -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] need a quick app
hello all, I need to find a database app (php/mysql) where outside users can enter information in a form and then that data can be acted upon by inside users We have an app now that I inherited that was originally built from phpnuke or postnuke. It cant be used (on our site) with redhat/php stronghold because of mcrypt so I'm trying to find something that I can load and customize without too much time. If I had alot of time for this I'd build something from scratch :(. I considered modifying the current app but dont have alot of faith in that route as the app is buggy anyway... Does anyone have any suggestions? I can find a ton on sourceforge.net probably but wanted to see if anyone has had to do something similar and can recommend something. I have been searching the archives for CMS and am looking into some of these: drupal and typo3... But content management is a bit overkill for my needs right now... Any comments are welcomed. Thx Mignon -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] support to palm db
On Tue, 7 Oct 2003 15:38:38 -0300 Cesar Schneider <[EMAIL PROTECTED]> wrote: > Hi... > php have PalmDB(.pdb) extensions ? > if not, have plans to implement in future versions ? > > thanks > > Cesar > Cesar, Perhasp you could explain what a PalmDB is?? It is the web server that decided what to do the file of a certain extension. There is nothing stopping you from using a file extension of you choice an associating it with php, either in the web server config or the os if you are using the stand alone binary under windows. George Patterson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Is it possible to access MySQL table on server A from server B?
Someone let me use their extra web space so I would have a banner-free place to put my site. After their domain name expired, they didn't re-register it, and didn't let me know ahead of time. I wasn't thinking properly, so I had not created a backup of any of the tables in my database. I have purchased my own domain now, and am wondering if there is any kind of code I can execute from my current domain to copy or back up the tables from the old domain. I believe the database has not yet been deleted, since my user account has not been deleted, and all of the files I've uploaded through FTP are still intact. I've sent several e-mails to the company that was providing the shared hosting package, but did not receive any response, so I don't think they will help in any way. If anyone could me know if accessing the database on the old server from the new server is possible and how to do it, or if I'm just plain old SOL, I would greatly appreciate it. Thanks in advance :) Trisha __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
