We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › MySQL, Processing
Pages: 1 2 
MySQL, Processing (Read 4561 times)
Re: MySQL, Processing
Reply #15 - Apr 2nd, 2009, 7:41am
 










SQL.getTimestamp(): java.sql.SQLException.
java.sql.SQLException: Cannot convert value '08:38' from column 2 to TIMESTAMP.


     at com.mysql.jdbc.ResultSet.getTimestampFromString(ResultSet.java:5538)
     at com.mysql.jdbc.ResultSet.getTimestampInternal(ResultSet.java:5566)
     at com.mysql.jdbc.ResultSet.getTimestamp(ResultSet.java:5219)
     at com.mysql.jdbc.ResultSet.getTimestamp(ResultSet.java:5257)
     at de.bezier.data.sql.SQL.getTimestamp(Unknown Source)
     at argh.setup(argh.java:169)
     at processing.core.PApplet.handleDraw(PApplet.java:1383)
     at processing.core.PApplet.run(PApplet.java:1311)
     at java.lang.Thread.run(Thread.java:613)


etc..
Re: MySQL, Processing
Reply #16 - Apr 2nd, 2009, 9:44am
 
i guess that you still have your old values in the database .. did you check that?

F
Re: MySQL, Processing
Reply #17 - Apr 2nd, 2009, 10:30am
 
i've tried deleting entries in the db and same errors.

i have a feeling it might be my php ...


//$email=$_POST['email'];
$date=date('jS M y');
$time=date('g:i a');

$date2=date('c');


$conn = mysql_connect('localhost','root','root') or die('Error connecting to mysql');
mysql_select_db('myDB');


$prayer=$_POST['prayer'];


//$prayer=mysql_real_escape_string($message);
//Take a new line after stringpos
$query="insert into prayers values ('".NULL."','".$message."','".$date2."')";


$result = mysql_query($query);

echo "<center>";
echo "Thanks";
echo '<br>';

echo "dfghskgd";
echo '<br>';
echo $date2;

echo " @ ";


echo "$time";


?>

Any ideas?

..sorry im such a pest.  i am a amateur trying to take on 3 languages in a very short space of time.

thank you thank you.
Re: MySQL, Processing
Reply #18 - Apr 2nd, 2009, 12:16pm
 
I don't know if MySQL will accept this 'c' (ISO 8601) format.
I had success feeding it with format 'Y-m-d H:i:s'
Pages: 1 2