GeorgeS
Posts: 206
|
| Posted: 09/23/2004, 11:37 AM |
|
Hi,
I'm debugging a page where I have this Directory component and nothing else.
No modifications.
Here is what MySql gives me:
Debug: query = SELECT COUNT(*) FROM groupings WHERE id = 0
Debug: query = SELECT * FROM groupings WHERE id = 0
Debug: query = SELECT COUNT(*) FROM groupings cat LEFT JOIN groupings sub ON cat.id = sub.parentid WHERE cat.parentid = 0
Debug: query = SELECT cat.id AS cat_id, cat.name AS cat_name, sub.id AS sub_id, sub.name AS sub_name FROM groupings cat LEFT JOIN groupings sub ON cat.id = sub.parentid WHERE cat.parentid = 0
Debug: query = SELECT COUNT(*) FROM groupings cat LEFT JOIN groupings sub ON cat.id = sub.parentid WHERE cat.parentid = 0
Debug: query = SELECT cat.id AS cat_id, cat.name AS cat_name, sub.id AS sub_id, sub.name AS sub_name FROM groupings cat LEFT JOIN groupings sub ON cat.id = sub.parentid WHERE cat.parentid = 0
Why the last 2 queries are executing 2 times?
How do I turn them off?
Also, why CCS generated LEFT JOIN?
All that is needed is:
SELECT id, name, parentid
FROM groupings
WHERE parentid = id
ORDER BY name
Thank you
_________________
GeorgeS |
 |
 |
|