This is my first post here at Kirupa so I hope I get it right…
At the end of a game I’m making I want to display the length of time it took to complete. When all is said and done (i.e., after all the code and calculations have been done to get the hours, minutes, and seconds played) I have code that looks kind of like this:
gameTime = gameHours + “:” + gameMinutes + “:” + gameSeconds;
So that gameTime looks like: 08:24:32
I’m trying to put gameTime, along with a few other items of data, into a database via PHP and MySQL. I’ve been successful at passing regular old integers and text into my database table using loadVariablesNum but haven’t been able to pass “gameTime”. My hunch is that it has something to do with the colons in the gameTime string but I’m not sure.
When I say that I “haven’t been able to pass” what I mean is when I click on the button that’s supposed to put the data into the database nothing happens, whereas when I click on the button when I’m just trying to pass simple numbers and text I’ll see “transferring data from…” in the bottom left corner of my FireFox browser and when I look at the database, values have been entered. I think the problem is the data type of gameTime because if I change gameTime to something like a number or text it puts it in the database just fine. It’s only when I make gameTime look how it actually needs to be that I have a problem.
Hopefully my problem is clear and hopefully I’m in the right place. If you need more info just let me know.