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()...
...seems to get caught when the APARTMENT is instantiating a new Property, but I am instantiating the apartment from Property(). Makes sense?
Does anyone have any advice on how to do this properly?
Thank you,
Scott
This may not seem to PHP, but I am using PHP, and am looking for examples *in* php
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
...AB51 5PB"
"12, Morlich Avenue, Ellon, Aberdeenshire AB41 9GJ"
"5, Vaynes Park Brechin Angus DD9 6LA"
The fields I need are (address1, Address2*, City, Region*, Post Code) where *=optional.
Ive tried working backwards, like "Find two blocks of chars separated by a whitespace in $1, etc...but...
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.
Yes, there will be a data layer, but I over simplified the specification. I will be using a DB with a data object. But theres other things to do as well. I have a Templating "object', session objects, etc. But I dont see why you cant use OO for a web app with in conjunction with relational database.
-->So when part of your app can be used elsewhere, then OO may be the way to go, though you can still reuse in perl with methods,
With OTHER method, ie Modules!
Reminds self to hit "Preview" before "Sumit
Let me tell you why i decided to take the leap with this particular project:
The App will be basically to take sports stats via an admin panel on a game by game/player by player basis. All the player info, game info, season info, etc is stored and viewed and such later.
It will be available...
1DMF - Thats exactly the conundrum I have, which was I guess the original intention of this thread. When you use video games, car, dog examples, it comes clear eventually, but when you have to model concepts and such, thats where i go wrong as well. Then you add layers and such.
But this thread...
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.