CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Altering the query in the beforeshow grid event

Print topic Send  topic

Author Message
SC
Posted: 06/18/2002, 7:22 AM

CCS 1.0 PHP MySQL

Can you add an sqlparamter at this point?

I'm tring select records based on the UserID.

beforeshow event code.
-------------------------
global $clan_member1,$DBLeague;
if (CCGetSession("GroupID") <> 99 ){
$clan_member1->wp = new clsSQLParameters();
$clan_member1->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $clan_member1->Parameters["sesUserID"], "");
$clan_member1->wp->Criterion[1] = $clan_member1->wp->Operation(opEqual, "Clan_Mid", $clan_member1->wp->GetDBValue("1"), $DBLeague->ToSQL($clan_member1->wp->GetDBValue("1"), ccsInteger));
$clan_member1->wp->AssembledWhere = $clan_member1->wp->Criterion[1];
$clan_member1->Where = $clan_member1->wp->AssembledWhere;
}
Nicole
Posted: 06/19/2002, 11:55 PM

Hello,
you do not need so much coding to add one condition to Where clause. Create gird form Before Build Select event and enter code like:
global $<form_name>;
global $DB<connection_name>;
if (CCGetSession("<project_name>GroupID") <> 99 ){
$<form_name>->ds->Where = "field_name=" .$DB<connection_name>->ToSQL(CCGetSession("<project_name>UserID"), ccsInteger);
}


   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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