Does anyone know of any existing function available, or offer advice on how to implement the following:
Given the time in minutes, how can I convert it onto a time string?
Example:
480 converts to 8:00 AM. 510 converts to 8:30. 525 converts to 8:45. 0 converts to 12:00 AM. This seems simple...
This is one of my many dumb moves, but I solved it. In the if checked conditional, if it was checked I wasnt putting in the name=checkboxes[] in the generated HTML, only in the else. Beleive it or not, your asking for the HTML made me see the error, so thanks :)
I am prepopulating checkboxes from MySQL. This works just fine. When I go to the form, the values that are stored in the database are in fact prechecked. (Using HTML CHECKED in the checkbox tag). If I select a few more checkboxes, however, and submit, ONLY the new ones that I manually checked...
As a follow up, since I'm asking for advice...
Should I be implementing in some way so that in the example above I could just do something like $apartment->get_property_name() without calling it from the property object. If so, how? Just have a function in apartment called get_property_name()...
I am doing an application where I have essentialy a class per table of my mySQL database. I am stuck at a one-to-many and how to implement the classes.
Specifics:
I have a property table (and class), and an apartment table(and class). The apartment table has a foreign key property_id to the...
I pull some HTML from a mySQL DB to put into a text field. The problem is if there is a single quote it thinks its the end of the value attribute for the text field.
So, in my script I want to somehow replace the ' with the ASCII character, but that is goofy too with its perl-ism.
Heres what I...
Remove the first Comma, so that 'Unit Number' is now correctly not delimited and is part of address1. Id then (Perhaps incorrectly) That up to the next comma could be stored in Address 2. After that, Id have to start using the advice above and checking a list of towns/counties, against this, as...
Sorry, I have a quoting error in that chunk, heres the proper data:
"Chemical Works, Weir Rd, Ayr, Ayrshire","ka8 8bd"
"Moycroft Industrial Estate, Elgin, Morayshire","iv30 1xz"
"Checkbar, Nigg, Aberdeen, Aberdeenshire","ab12 4lp"
"Moycroft Ind Est, Elgin, Morayshire","iv30 1xz"
"34, Mount...
Sure, here are about 100 lines. Note - Ive managed to get a hold of the post code in a separate field. So, theres one step.
"10, Maxwell Gardens, Hurlford, Kilmarnock, Ayrshire," ka1 5by"
"Unit 2, Umberley Rd, Kilmarnock, Ayrshire," ka1 5lb"
"Limekilns Rd, Ayr,," ka8 8dg"
"36, Lloyd Walk...
Thats actually a prettu good idea. Avoid the regex entirely and just map something persistent onto the others. Ill think Ill try this unless someone else can think of something.
Thanks.
Scott
I have a general "Address" field in a text data set. I need to extract from the general address field specific elements, such as "Address 1", Addy2", City", etc..
The problem is the formatting of that field is tough for this. Occassionay, theres a comma after the building number, occassionally...
I was offline for a few days, but I thought Id revive this a little. I very much like the idea of "Collaborating" on a project here to model something. I think, like said above, its be a good idea to try something slightly less concrete than say a Car, to help us along in real world projects.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.