[Zope] call SQL method

Pedro Silva Pedro Silva" <pedro.silva@ruido-visual.pt
Fri, 25 Feb 2000 16:19:41 -0000


Hi,

for me to call a SQL Method from a DTML all I have to do is:

    <dtml-call "sqlmethodname">

or I have to tell the parameteres of that sqlmethod?

The SQL Method that I'm trying to call insert information in a table. The
code that I have in that SQL Method is:

        INSERT INTO Registos
        (nome, apelido, morada, localidade, casa, telemovel, data_nasc)
        VALUES
        ('<dtml-var fname>',
        '<dtml-var lname>',
        '<dtml-var address> <dtml-var fzip>-<dtml-var restzip>',
        '<dtml-var localzip>',
        <dtml-var home_phone>,
        <dtml-var cel_phone>,
        '<dtml-var data_nasc>'
        )

        The arguments are: nome apelido morada localidade casa telemovel
data_nasc
        This arguments are the columns of the table.

        The variables fname, lname, address, and so on, are the variables of
a form in a DTML document.

If in a DTML Method I call the sql method this way: <dtml-call
"sqlInsert('<dtml-var fname>','<dtml-var lname>','<dtml-var
address>','<dtml-var fzip>','<dtml-var restzip>','<dtml-var
localzip>','<dtml-var home_phone>','<dtml-var cel_phone>','<dtml-var
year_date>','<dtml-var mes_date>','<dtml-var dia_date>')">

Is correct this way?

please send your answers to: psilva@ruido-visual.pt

Pedro