This topic is locked

Store

4/28/2009 6:21:22 AM
PHPRunner General questions
A
all3ssaf author

<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=11681&image=1&table=forumtopics' class='bbc_emoticon' alt=':(' /> hi
i have 2 table : 1-Store & 2-Sales

the Store table has a (Type_Name) field and a (No._in_Store) field
the Sales table has a (Type_Name) field , a (No.) field and (remaining_quantity_in_the _Store)
the (remaining_quantity_in_the _Store) field is colcolet (No.) of Sales - (No._in_Store) =
??????

J
Jane 4/28/2009

Hi,
to update remaining_quantity_in_the _Store field use Before record added/Before record updated events on theEvents tab.

Here is a sample:

global $dal;

$rs = $dal->Store->Query("`Type_Name`='".$values["Type_Name"]."'","");

$data = db_fetch_array($rs);
$values["remaining_quantity_in_the _Store"] = $values["No"] - $data["No._in_Store"];

A
all3ssaf author 4/28/2009

Hi,

to update remaining_quantity_in_the _Store field use Before record added/Before record updated events on theEvents tab.

Here is a sample:


i get this error
Undefined property: tDAL::$Store

Sergey Kornilov admin 4/28/2009

Make sure Store table is included into your project.

A
all3ssaf author 4/30/2009

Make sure Store table is included into your project.


it includ my project
and i get same error

J
Jane 4/30/2009

It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.