How are you saving data in items? (code for controller/view/and
model).
Would it be possible for you to use HABTM for table 2 and 4 to
automate some of the steps?
On Dec 8, 9:21 am, ridwan arifandi [EMAIL PROTECTED] wrote:
i have 5 tables like these
1). purchases
2). purchase_details
thanks for your reply..
i tried it too, and it cannot work,
i used debug($data_item) in temporary_items_controller.php and debug
($data) in model.php, it wasn't empty ( has value )
i dont know, only ITEM model but others can work rightly
thanks a lot
On Dec 8, 6:00 pm, Milmar [EMAIL
Try to log what $data_item contains and check if the structure being
passed to the model is correct.
Then you can try
$this-Item-Create($data_item); and;
$this-Item-Save($data_item);
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
here is the code..
now, this function can work normally, but only for ITEM model, i use
manual query likle INSERT INTO 'items' VALUES(...).
$this-Item-getLastInsertID doesn't work too, so i use
msqyl_insert_id ant it works.
Maybe you can try a simple test case whose only purpose is to save
something in the item table (separate this test function from the
finish function.). When you get that to work, it would be easier to
debug within the finish function.
Also, try looking into HABTM and other built-in cake features
ridwan arifandi wrote:
in an action, i have to do more than one save action. rule
1). save data into purchases
2). get last insert id from table purchases
3). save data into items
4). get last insert id from table items
5). save data into purchase_details with those two variables
(
i have 5 tables like these
1). purchases
2). purchase_details
- purchase_id
- item_id
3). items
4). purchase_item_details
- purchase_detail_id
- item_detail_id
5). item_details
- item_id
in an action, i have to do more than one save action. rule
1). save data into