I get the following error when trying to save a model - "userprofile.save()" -
(1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'), `gender` = ("\'F\'",), `hideyear` = (\'0\',), `address` = ("\'97 Rochdale Rd\\\\r\\\\n\' at line 1') The data comes from a form, one of the fields being "address". It would appear that the final part < `address` = ("\'97 Rochdale Rd\\\\r\ \\\n\' > does not have a closing parenthesis. If I put more data into the textbox for the address field, this is the result: ProgrammingError at /form/profile/ (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'), `gender` = ("\'F\'",), `hideyear` = (\'0\',), `address` = ("\'97 Rochdale Manor Ho\' at line 1') This seems like there is a larger SQL command, which has been truncated at exactly the same character position. This theory is borne out by other experiments: if the address field is left blank, the next field "telephone" is truncated at the same position... This is the version of mySql:- $ mysql -V mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) using readline 5.2 $ I'm using Django trunk 7788, from +/- 0100 GMT today 30/6/2008. So, I wonder how I can look at the full text of the string which is being passed to mySql, and whether anyone knows of any string size limitation in Django SQL statements (this seems unlikely, as I would probably have found it in the forum somewhere: there are lots of posts about error 1064, but none AFAIK seem to reflect my problem), or maybe there is a mySql setting which allows/disallows incomplete lines? Maybe Django was going to follow with the rest of the statement, but mySql threw an error? Hmmm. Think I'll re-read the mySql manual... but in the meantime, does anyone have any ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---