CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> GotoCode Archive

 master/detail and with PHP and CCS

Print topic Send  topic

Author Message
thierry
Posted: 08/02/2002, 5:32 AM

do I miss something , i got parse error call to a member function on a non object
great thanks
<?php
//BindEvents Method @1-038522BE
function BindEvents()
{
global $eventype;
$eventype->CCSEvents["BeforeShowRow"] = "eventype_BeforeShowRow";
}
//End BindEvents Method

function eventype_BeforeShowRow() { //eventype_BeforeShowRow @4-07934E5B

global $eventmaster;
global $DBmysql_dsn;

$number = CCDLookUp("count(*)", "events", "events.eventype_id=" .$eventmaster->eventype_id->Value, $DBmysql_dsn);
$eventmaster->eventype_us->SetValue($eventmaster->eventype_us->Value.")");//Custom Code @18-2A29BDB7
// -------------------------
// Write your own code here.
// -------------------------
//End Custom Code

} //Close eventype_BeforeShowRow @4-FCB6E20C
Nicole
Posted: 08/05/2002, 5:56 AM

Thierry,
for what row do you get the error? Please check you have typed in correct var names
Rao
Posted: 08/05/2002, 9:04 PM

Is there a link where we can find som eexample of Master / Detail pages using PHP and CCS.
mkmind
Posted: 08/06/2002, 12:31 AM

Hello.
You need a new dbconnection when you CCDLookUp else you will got this Message:
"parse error call to a member function on a non object"

Look at this Code and you will see what I mean:


function orders1_insert_OnClick() { //orders1_insert_OnClick @47-45E9135C

//Custom Code @114-2A29BDB7
// -------------------------
global $orders1;
$db = new clsDBinternet();
$dbinternet = new clsDBinternet;
$mkmind=CCGetSession("sid");
$mkme = CCGetParam("quantity", "");
$mkmm = CCGetParam("item_id", "");
$it_id = CCDLookUp("item_id","bs_orders","member_id='$mkmind'AND item_id='$mkmm'", $dbinternet);
if($it_id==$mkmm){
$sql = "UPDATE bs_orders SET quantity=quantity+'$mkme' WHERE member_id='$mkmind' AND item_id='$mkmm'";
$db->query($sql);}
else{
$sql = "INSERT INTO bs_orders ("
. "quantity, "
. "item_id, "
. "member_id"
. ") VALUES ("
. CCToSQL("$mkme", "Number") . ", "
. CCToSQL("$mkmm", "Number") . ", "
. CCToSQL("$mkmind", "Text")
. ")";
$db->query($sql); }
// -------------------------
//End Custom Code

} //Close orders1_insert_OnClick @47-FCB6E20C

I hope it helps and sorry about my English
Greets from Germany
Martin

   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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