I’m trying to execute the following query via php’s mysql_query function but it’s not working.
When I execute it directly (via phpMyAdmin’s sql tab) it does work. Any idea what’s going on?
Update t1 SET r ='[{"Ia":36.009,"Ja":-78.93},{"Ia":36.01,"Ja":-78.93}]' WHERE id=1
Thanks!
It depends on how you use it. You have to escape your quotes. So it should be :
OR
Anyway, that is not pretty safe. You should have a look over prepared statements, PDO, MySQLi .
Standard mysql is old and lacks of lots of features.
Hope this helps.