cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SANSONE, AARON M [Non-Pharmacia/1000]" <aaron.m.sans...@monsanto.com>
Subject RE: MySQL Insert
Date Wed, 13 Feb 2002 13:55:41 GMT
Ferran,

Yes you can do any SQL statement using the transformer.  An insert may look
like this:

<?xml version="1.0"?>

<page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
  <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
   <query name="insert_query" isstoredprocedure="false" >
  insert into tablex ( username, password, activeFlag ) values
('<substitute-value sql:name="username"/>', '<substitute-value
sql:name="password"/>', 'Y')
   </query>
  </execute-query>
</page>


Then process this throught the SQLTransformer and you should see your data
in the DB (assuming you have access to insert to this table of course!).

HTH,
Aaron

-----Original Message-----
From: Ferran Urgell [mailto:ferran_urgell@hotmail.com]
Sent: Tuesday, February 12, 2002 7:10 AM
To: cocoon-users@xml.apache.org
Subject: MySQL Insert


Note: I'm using the sql transformer for the querys.....Can I use the sql
transformer for the inserts ?

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message