<strong style="font-weight: normal;">Hello,<br><br></strong>My ZSQL method receive a *mylist* parameter that should be an integer list : [21,35]<br><br>The following code does not work :<br><br>
SELECT *<br>FROM MyTable<br>WHERE<br> id in <br> (<dtml-in mylist><br> <dtml-sqlvar sequence-item type=int> <dtml-if sequence-last><dtml-else>,</dtml-if><br> </dtml-in>)<br>
<br><div class="row">
<div class="label">*Type de l'erreur*</div>
<div class="field">NameError</div>
</div>
<div class="row">
<div class="label">*Valeur de l'erreur*</div>
<div class="field">'client' may not be used as an argument name in this context</div>
</div><br>This other code does not work better :<br><br>
SELECT *<br>FROM MyTable<br>WHERE<br> id in <br> (<dtml-in mylist prefix="myid"><br> <dtml-sqlvar expr="myid_item" type=int> <dtml-if sequence-last><dtml-else>,</dtml-if><br>
</dtml-in>)<br><br>*Same error*<br><br>However, if I use a dictionary list of this type [{'id':21},{'id':35}] with the following code, it works (but it's heavy) <br><br>SELECT *<br>FROM MyTable<br>
WHERE<br> id in <br> (<dtml-in mylist mapping><br> <dtml-sqlvar id type=int> <dtml-if sequence-last><dtml-else>,</dtml-if><br> </dtml-in>)<br><br>The python script that calls my ZSQL method has already build the integer list and I would like to use it as is.<br>
<br>Thanks for your help<br>