btw, the best approach (if applicable) would be to have a single
forloop on
a query that joins 2 tables. Check if SQL can help you build such a
query or
you may elaborate the problem on the list. It sounds like Jeff has a
pretty
strong experience in database queries. My previous message was only
meant
to point out why that specific construct based on nested loops failed.
-- Massimo
On Tue, 29 Mar 2011 23:12:42 +0400, Cyril Shumff wrote:
Thanks, but my last sql-query is only an example, actually the
problem is much more complicated and there is need to use the "array"
in the body of "forall". Other commands (array, list, etc) in the
body
"forall" also stops a cycle.
29.03.2011 21:43, Jeff Lawson wrote:
If you're trying to get all of the matching specficiation_id's, then
maybe you want something like:
set myspecs [db list "SELECT specifications_id FROM
product_specifications, products WHERE
product_specifications.products_id = products.products_id"]
On Tue, Mar 29, 2011 at 12:19 PM, Cyril Shtumf wrote:
Hello everyone!
I was faced with an insurmountable problem when using the package
DIO. The problem is that the command "forall" returns only one
row, if the body contains the command "array". For example:
db forall "SELECT `products_id` FROM `products`" row {
db array "SELECT `specifications_id` FROM
`products_specifications` WHERE `products_id` =
'$row(products_id)'" row2
}
Alas, I don't know how to fix it. I hope for your help.
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org [1]
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org
[2]
Links:
------
[1] mailto:rivet-dev-unsubscr...@tcl.apache.org
[2] mailto:rivet-dev-h...@tcl.apache.org
[3] mailto:webmas...@livehistory.ru
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org