I have managed to post the data using:
$ldatabase->execute_query("update mail_newsletter set sent='Y',date_sent=now() where msg_id = ". $mrecord['msg_id']);
$ldatabase->execute_query("update mail_sub_msgs set date_sent=now() where msg_id = ". $mrecord['msg_id']);
However, now I have trouble retrieving the date from the database.
This is what I tried (date in last column of row):
function showList(){
$list_id= (int)$_REQUEST['curr_list_id'];
$chk= new cquery();
$chk->set_query_sql("SELECT display FROM mail_customfields_lists WHERE list_id = $list_id");
$chk->run_query();
if($chk->num_of_rows() != 1){
cbaseform::showList(true);
}else{
$foo= $chk->get_next_hash();
$e= '<tr class="rows" onmouseover="this.className=\'hilite\'" onmouseout="this.className=\'\'">
<td valign="top" align="left" width="26px"><input TYPE="checkbox" NAME="select[]" Value="{SUB_ID}" {SELECT}></td>';
foreach(unserialize($foo['display']) as $k=>$v){
$e.= '<td valign="top" align="right" nowrap><a href="{FILE}?sub_id={SUB_ID}&todo=edit">{' . strtoupper($k) . '}</a></td>';
$chk->set_query_sql("SELECT date_sent FROM mail_sub_msgs WHERE date_sent = $date_sent");
'<td><a href="cmessages.php?msg_id={MSG_ID}&todo=edit">{DATE_SENT}</a></td>';
}
$e.= '</tr>';
parent::showList(true,$e,count(unserialize($foo['display'])) + 1);
}
}
Now I get Error Message:
Notice: Undefined variable: date_sent in /usr/local/pem/vhosts/.....
I don't know how to define the variable or if that is the right solution.
Any help?