[Zope] multiple INSERT in one sql method

Jim Fulton jim@digicool.com
Fri, 04 Jun 1999 19:07:28 -0400


"Daniel M. Drucker" wrote:
> 
> > Is it possible to do more than one INSERT in a single SQL method?
> 
> Apparently not,

See my other message. 

> but I also tried the following and it returned to me this:
> 
>  ok you added foo
>  ok you added bar
>  ok you added baz
> 
> But the database was NOT modified.

That's odd. Hm...
 
> thing.html:
> <FORM METHOD=POST ACTION="inserts.html">
> <SELECT NAME="asdf" MULTIPLE SIZE=4>
> <option selected value="foo">foo
> <option selected value="bar">bar
> <option selected value="baz">baz
> </SELECT>
> <input type=submit></FORM>
> 
> inserts.html:
> <!--#in asdf-->
> <!--#call inserts(_.['sequence-item'])-->

When you call an SQL method, you need to use keyword arguments:

  <!--#call inserts(thingie=_.['sequence-item'])-->

I'm really surprized you didn't get an error message. Are you sure
the SQL method didn't give a default for thingie?

Jim

--
Jim Fulton           mailto:jim@digicool.com   Python Powered!        
Technical Director   (888) 344-4332            http://www.python.org  
Digital Creations    http://www.digicool.com   http://www.zope.org    

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.