This topic is locked

What this error means?

7/15/2010 10:03:07 PM
PHPRunner General questions
B
bangke author

Each time i save data on SALES_DETAILS table, then error occurs:
Database DDL Structure

CREATE TABLE IF NOT EXISTS `sales` (

`NO_TRANS` char(20) NOT NULL,

`DATE` date NOT NULL,

`CUSTOMER` int(11) NOT NULL,

`EMPLOYEE` int(11) DEFAULT NULL,

PRIMARY KEY (`NO_TRANS`),

UNIQUE KEY `NO_TRANS` (`NO_TRANS`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `sales_details` (

`PICK_ID` char(20) NOT NULL,

`NO_TRANS` char(20) NOT NULL,

`NO_PART` char(25) NOT NULL,

`DESCRIPTION` char(50) DEFAULT NULL,

`QTY` int(11) DEFAULT NULL,

`UNIT_PRICE` int(11) DEFAULT NULL,

`DISCOUNT` decimal(10,0) DEFAULT NULL,

`TOTAL` int(11) DEFAULT NULL,

PRIMARY KEY (`PICK_ID`),

UNIQUE KEY `PICK_ID` (`PICK_ID`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;


Custom code :
on BEFORE RECORD ADDED and BEFORE RECORD UPDATED to count totals per row :

$values["total"] = ($values["unit_price"] * $values["Qty"]) - (($values["discount"]/100)*($values["unit_price"] * $values["Qty"]));


on AFTER RECORD ADDED and AFTER RECORD UPDATED to pull part description from another table (mst_part table)

$sql = "UPDATE sales_details SET description =(SELECT partdesc FROM mst_part WHERE partnum=no_part)";

CustomQuery($sql);


I have tested all custom code in other PHPRUNNER projects and everything's ok.

Mysql version 5.1.46-community

A
ann 7/16/2010

Hi,
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. 'Demo Account' button can be found on the last screen in the program.

B
bangke author 7/16/2010



Hi,
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. 'Demo Account' button can be found on the last screen in the program.


i use phprunner evaluation version. so i don't have a demo account.

A
ann 7/16/2010

Hi,
Demo Account can be created by all users. Just type your email address in the corresponding line of theDemo account dialog and you'll create an account.

B
bangke author 7/18/2010



Hi,
Demo Account can be created by all users. Just type your email address in the corresponding line of theDemo account dialog and you'll create an account.



i have upload my project to asprunner demo account, please navigate to :
http://demo.asprunner.net/cicak_live_com/sbx/sls_part_add.php
Error message :
displayed when i try to add an new record to DETAIL TABLE (SLS DETAILS)

Sergey Kornilov admin 7/18/2010

This error happens because you use a cracked version of PHPRunner.