More Grafted fields [SOLVED]
Posted: Tue May 25, 2010 9:08 am
Hiya,
I thought I'd got my head round this but clearly not.
In a table called "ContractData" I have some fields that will be populated. What I'd like to do is get some of those fields (there are about 5 in total) to also show up in another table called "BillData".
So, (just testing one of the fields here) in BillData/BillData.php, I did this.
Here I thought I was basically saying grab me the WinningSupplier..... column from ContractData and call it the same thing in BillData.
It errors in the apache logs saying it's a duplicate column. So I guess it's trying to put in into ContractData again instead of BillData. That command works from the CLI though.
Can you help please?
Thanks
Paul
I thought I'd got my head round this but clearly not.
In a table called "ContractData" I have some fields that will be populated. What I'd like to do is get some of those fields (there are about 5 in total) to also show up in another table called "BillData".
So, (just testing one of the fields here) in BillData/BillData.php, I did this.
- Code: Select all
function __sql__(){
return "select f.*, f.WinningSupplierStandingChargeType AS WinningSupplierStandingChargeType FROM ContractData f";
}
Here I thought I was basically saying grab me the WinningSupplier..... column from ContractData and call it the same thing in BillData.
It errors in the apache logs saying it's a duplicate column. So I guess it's trying to put in into ContractData again instead of BillData. That command works from the CLI though.
Can you help please?
Thanks
Paul