This topic is locked

Before record added Example Plzzz

1/26/2011 1:22:39 AM
PHPRunner General questions
author

Hi im new to PHP Runner
i want to know how do i use before record adding event
i want to know whether record exists or not.
plzz give me a example for before record adding event

D
danaci 1/26/2011

$values["your field"]="your data";

500485 1/26/2011



$values["your field"]="your data";


hi again
how do i use $message variable to display message before record adding
also how to use return true varible
i have table
table name :Sales Confirmation
there have SCNO and the SEQNO
before record adding i want to check this SCNO and SEQNO already exists in the Sales Confirmation
how do i do this before record adding
plzz provide sample coding for this

D
danaci 1/26/2011

global $strTablename;

$str = "select sum(FieldName) from payments where BillID=".$_SESSION[$strTableName."_masterkey1"];

$rs = CustomQuery($str);

$data = db_fetch_numarray($rs);
if ($data>0)

{

return false
}

else

{

.....

.....

return true;

}