Commit 90a2054a authored by Jean-Paul Smets's avatar Jean-Paul Smets

improved by jps : 10 x faster


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@85 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d1c603e1
...@@ -12,28 +12,17 @@ sort_on</params> ...@@ -12,28 +12,17 @@ sort_on</params>
SELECT SELECT
cell.uid, cell.Id, cell.path, cell.Description, movement.variation_text cell.uid, cell.Id, cell.path, cell.Description, movement.variation_text
FROM FROM
catalog AS cell, catalog AS line, movement catalog as cell, movement
WHERE WHERE
(( movement.delivery_uid = <dtml-sqlvar uid type="int">
cell.parent_uid = line.uid
AND
line.parent_uid = <dtml-sqlvar uid type="int">
AND AND
movement.uid = cell.uid movement.uid = cell.uid
AND AND
movement.is_accountable = 1 movement.is_accountable = 1
)
OR
(
line.parent_uid = <dtml-sqlvar uid type="int">
AND
line.uid = cell.uid
AND AND
movement.uid = cell.uid cell.portal_type <> "Simulation Movement"
AND AND
movement.is_accountable = 1 cell.portal_type <> "Container"
))
AND cell.portal_type <> "Container"
<dtml-if sort_on>ORDER BY <dtml-if sort_on>ORDER BY
<dtml-var sort_on> <dtml-var sort_on>
</dtml-if> </dtml-if>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment