Cannot write slash in database
in
Contributed Library Questions
•
1 year ago
Hi,
P.S: sorry for my bad english.
I have to write string array like "2012/4/30" in mysql database using "de.bezier.data.sql.*" library in my sketch. Here how I get this string:
String[] date = new String[3];
String s = String.valueOf(y);
date[0] = s;
s = String.valueOf(m);
date[1] = s;
s = String.valueOf(d);
date[2] = s;
String joinedDate = join(date, "/");
println(joinedDate);
Here how I am trying to insert it into database:
msql.execute( "INSERT INTO temperature (id, temp, date) VALUES (NULL, '"+inBuffer+"', "+joinedDate+" );" );
But in database I have this: 16.766666666666666666. How can I fix it? This field in database should be exactly in this format.
1