I am sure this is quite simple but I cannot figure this out. Ijust want to increase the column sizes so the information in each column does not seem bunched up which causes it to extend onto a second line.
@NightShift58Jan 13.2007 — #This is actually HTML/CSS. It would be something like [b]<td nowrap>[/b] or better, [b]<td style='white-space: nowrap;'>[/b] or the same definition included in CSS and used with "class":
@sac8513authorJan 13.2007 — #Yea I knew it was something simple like that. Just couldnt think of that proper attribute. Thanks
Now let me ask you (you were actually helping me out with this the other night). I have finished developing the code that allows me to access a specific database and output the hours of operations for the particular business.
The code is now modified in conjunction with the server time to now output "open" or "closed" accordingly. The problem I have run into is that for each day of the week there are different hours of operation. I figure i will have to creat a new table with the days of the week along with thos hours.
@NightShift58Jan 14.2007 — #I don't know what will make more sense in your application in the long run but you have options. You could:
(1) modify your current table to hold the opening and closing times for each day of the week in a single record for each store, or
(2) create an additional table where each record contains the opening and closing times for each store for each day.
The "proper" way would be option 2. However, because we are dealing with days of the week, which is a limited set, and because we can expect that all stores will have times for all 7 days of the week, option 1 is more practical and you should use that one.
After modification, your table could look like this:<i> </i>store_id int(5) store_offset int(2) Sun_open time(4) {format: "HH:MM") Sun_close time(4) Mon_open time(4) Mon_close time(4) ... ... Sat_open time(4) Sat_close time(4) Use "store_offset" to store the time difference between the store's time zone and the server's.
You can use [b]date("D")[/b] to determine the "Sun" through "Sat" of a given day. Instead of "Sun, Mon,..., Sat". you could use "d0,d1,...d6" instead and use [b]date("w")[/b] to get the corresponding day-of-week information.
Make sure that the opening and closing times fields are defined as type TIME with a length of 4. Then, when comparing the current time to the store's, you can use [b]date("HH:ii")[/b] to get the server's current time in HH:MM format.