title: need to insert from grid to mysql database
body: <p>I want to insert the data I have in my grid in table 'quote' in my database, when I put this code in the trigger on ProcessMaker.
  when I tried with a normal form it worked but if the grid it works I think it's a problem of syntax or foreach gridsizerows n is not, can someone please help me:
  here is the code </p>
  
     <pre class="lang-php prettyprint-override"><code>$i=0 foreach ($i &lt; $gridsizerows) {
     $i = i +1;
     $id = @mygrid [$i]['id'];
     $quantity = @mygrid[$i]['quantity'];
     $pu = @mygrid[$i]['possible'];
     $pt = @mygrid[$i]['pt'];
     $to = @mygrid [$i]['designation'];
     $sql = "INSERT INTO quotes (id, designation, quantity, pu, pt) VALUES ($id, $from, $pu, $pt, $amount)";
     $tmp_db = executeQuery($sql, '90911865253a802b030e577077431812');
  }
  </code></pre>