Originally Posted by
superprg
Error string seems to be the php coding problem
Can you post the code here you tried to read the table?
May be you have forgotten to include some file(s)?
Here is the code:
Code:
$licences = array();
$this->licences_html = $this->licences_text = '';
for ($i=0, $n=sizeof($this->products); $i<$n; $i++) {
$db->Execute('UPDATE products_licences SET orders_id='.$zf_insert_id
. ' WHERE products_id='.(int)$this->products[$i]['id']
. ' AND orders_id IS NULL'
. ' LIMIT '.$this->products[$i]['qty']
);
$dbres = $db->Execute('SELECT licences_code FROM products_licences'
. ' WHERE products_id='.(int)$this->products[$i]['id']
. ' AND orders_id='.$zf_insert_id
);
while(!$dbres->EOF) {
$this->licences_html .= '<p>'.(int)$this->products[$i]['id'].':<br><span class=licences_code>'.$dbres->fields['licences_code'].'</span></p>';
$this->licences_text .= "Here is the Serial Number for your program "."\n".$this->products[$i]['name'].":\n".$dbres->fields['licences_code']."\n\n";
$licences[(int)$this->products[$i]['id']][] = $dbres->fields['licences_code'];
$dbres->MoveNext();
}
}
I am getting the error on this line:
$db->Execute('UPDATE products_licences SET orders_id='.$zf_insert_id
Thanks,
Dave
Bookmarks