Welcome Guest, Not a member yet? Register   Sign In
can't write strings to database
#8

[eluser]illuzionist[/eluser]
[quote author="CroNiX" date="1342294996"]Yes you cast them, but then you tried to add them together as if they were numbers.
+ is addition, as in math.
. is string concatenation, as in joining strings together

Change your +'s to .'s

Not sure what you are doing with the gps coordinates, but personally I would save each value in their own lat/lng column (decimal), or I would just save them as a lat/lng pair separated by a comma, like "45.7071587,16.0575276" and then split them by the "," when retrieving. That would allow you to use the gps data for anything without having to change formats (since you are storing the coordinates in a non-standard format along with the text "Latitude" and "Longitude", it will be difficult to use them for anything else without more manipulation...)[/quote]

yeah I know, it would be better.. but I didn't make this SQL database, I just have a task to do upgrade some new functionality on the stuff that already exists Sad


Messages In This Thread
can't write strings to database - by El Forum - 07-14-2012, 11:11 AM
can't write strings to database - by El Forum - 07-14-2012, 11:24 AM
can't write strings to database - by El Forum - 07-14-2012, 11:25 AM
can't write strings to database - by El Forum - 07-14-2012, 11:35 AM
can't write strings to database - by El Forum - 07-14-2012, 12:04 PM
can't write strings to database - by El Forum - 07-14-2012, 12:28 PM
can't write strings to database - by El Forum - 07-14-2012, 12:43 PM
can't write strings to database - by El Forum - 07-14-2012, 12:47 PM
can't write strings to database - by El Forum - 07-14-2012, 12:50 PM
can't write strings to database - by El Forum - 07-14-2012, 01:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB