[Zope] mySQL - Z SQL - dtml-var

Gijs Reulen greulen@gilsing.nl
Mon, 17 Jul 2000 17:33:01 +0200


Why does this not work inside a Z SQL Method (using MySQL) ?!

INSERT INTO test1
( id, content, phone )
VALUES (
<dtml-var 12.12>,
<dtml-sqlvar content type=nb>,
<dtml-sqlvar phone type=nb optional>
)

According to the doc I should be able to use dtml-var statements in Z SQL
Methods. However, this returns an error: Error, exceptions.KeyError: 12.12

I also tried:
INSERT INTO test1
( id, content, phone )
VALUES (
<dtml-sqlvar id type=float>,
<dtml-sqlvar content type=nb>,
<dtml-sqlvar phone type=nb optional>
)

This also retuns an error: Error, exceptions.ValueError: Invalid
floating-point value for id

But it is no problem inserting data by hand into the database using the very
same value as I used in these tests (12.12).

What am I doing wrong ?

Gijs Reulen