I am convinced that the error, I have desribed in the thread "mysql command" is a bug. I have installed the following packages on three different PC's (running linux redhat8.0, mandrake 8.2 and mandrak 9.0):
zope 2.6.1 with python2.1.3
mysql-4.0.12-standard.tgz
MySQL-python-0.9.2.tar.gz
ZMySQLDA-2.0.8.tar.gz
The bug appears in all three installations, and when using three different browsers (opera, mozilla and konqueror). tI means that you will have syntax error message when You write:
select * from mytable;
select col1, col2 from mytable;
Observe the blank space after select. Instead you can use 'wrong' syntax:
select* from mytable;
select'''', col1, col2 from mytable;
Please, observe that there are no blank spaces after select. The last select query has 4 ' and a comma with no blanks before, between and after. It is not a nice solution, but it seems to work.
Flemming
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you need multiple SQL statements in the same Z SQL Method, you need to separate them with <dtml-sql_delimiter>. That's just a Zope/Z SQL thing, not a ZMySQLDA thing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am convinced that the error, I have desribed in the thread "mysql command" is a bug. I have installed the following packages on three different PC's (running linux redhat8.0, mandrake 8.2 and mandrak 9.0):
zope 2.6.1 with python2.1.3
mysql-4.0.12-standard.tgz
MySQL-python-0.9.2.tar.gz
ZMySQLDA-2.0.8.tar.gz
The bug appears in all three installations, and when using three different browsers (opera, mozilla and konqueror). tI means that you will have syntax error message when You write:
select * from mytable;
select col1, col2 from mytable;
Observe the blank space after select. Instead you can use 'wrong' syntax:
select* from mytable;
select'''', col1, col2 from mytable;
Please, observe that there are no blank spaces after select. The last select query has 4 ' and a comma with no blanks before, between and after. It is not a nice solution, but it seems to work.
Flemming
Well, I found the reason for the bug. I put a ; in the end of the mysql command.
Flemming
Yup, that would do it.
If you need multiple SQL statements in the same Z SQL Method, you need to separate them with <dtml-sql_delimiter>. That's just a Zope/Z SQL thing, not a ZMySQLDA thing.
Sorry, that's <dtml-var sql_delimiter>