CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Directory Component query executes 2 times. Why?

Print topic Send  topic

Author Message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.