To display the data than not null
Posted: Mon Feb 01, 2010 8:26 pm
By refer to below code :
Sample output :
Module : account
Issue Description : testing case
Attachment URL :
Reported Date : 2010-02-01
Reported By :
Resolved Date :
Resolved By :
How to change the code in order for me to display the fields "Module, Reported Date, Issue desc" only. The blank fields will not be display!
Desired output :
Module : account
Issue Description : testing case
Reported Date : 2010-02-01
Code: Select all
$sql = "SELECT * FROM vtiger_ticketcf WHERE ticketid = ?";
$result = $adb->pquery($sql, array($id));
$cffields = $adb->getFieldsArray($result);
foreach ($cffields as $cfOneField)
{
if ($cfOneField != 'ticketid')
{
$cfData = $adb->query_result($result,0,$cfOneField);
$sql = "SELECT fieldlabel FROM vtiger_field WHERE columnname = ? and vtiger_field.presence in (0,2)";
$cfLabel = $adb->query_result($adb->pquery($sql,array($cfOneField)),0,'fieldlabel');
$desc_parent .= '<br><br>'.$cfLabel.' : <br>'.$cfData;
}
}Module : account
Issue Description : testing case
Attachment URL :
Reported Date : 2010-02-01
Reported By :
Resolved Date :
Resolved By :
How to change the code in order for me to display the fields "Module, Reported Date, Issue desc" only. The blank fields will not be display!
Desired output :
Module : account
Issue Description : testing case
Reported Date : 2010-02-01