Re: Incorrect Autoinsert of created_date and created_user [message #2194 is a reply to message #2193] |
Wed, 08 July 2009 10:25 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to previous message](/theme/default/images/down.png) |
divico
Messages: 16 Registered: August 2008
|
Junior Member |
|
|
Hi Tony
The structure of the table has not been changed at all so there was no need to re-import the structure. I attach the <table>.dict.inc which was generated January 1st 2008 and still reflects the physical layout of the table.
My use case is as follows: I have 1:many relationship and based on the input provided at insert (add) of a record in the parent table I generate a series of records in the dependent table. I use the following code to do that:
...
Prepare records to be inserted in array $spill_file_fieldarray
...
$this->spill_file_obj = new spill_file;
$my_DML =& $this->spill_file_obj->_getDBMSengine($this->spill_file_obj- >dbms_engine, $this->spill_file_obj->dbname);
$my_DML->primary_key = array('monday_date','yahoo_symbol');
$this->ll_insert_spill_file($my_DML,"exchange","spill_file ",$spill_file_fieldarray);
function ll_insert_spill_file($mysql,$database,$table,$fieldarray)
{
foreach($fieldarray as $key=>$record)
{
$mysql->insertRecord($database,$table,$record);
}
}
Error occurs when I call insertRecord. None of my code actually references or even modifies fieldspec which is later used in dml.mysqli.class.inc. I have no clue how and at what point in time the fieldspec array is initialized with the values provided in my initial post (did not track that in the code so far). Are those values initialization values?
Also the code indicated above ran successful before. The last time I added a record to the parent table which triggered the insertRecord to the dependent table was January 18th 2009. I know this because I have a created_date column in the parent table. No code changes from my side since then. Unfortunately I don't know which version of radicore I ran early January.
Any help is appreciated,
Kind regards, Divico
|
|
|