getQuery(true);
// Query principale
$query->select([
'*',
'IF(a.data = "0000-00-00",NULL,date_format(a.data,"%d %M %Y")) AS data',
'IF(a.data = "0000-00-00",NULL,"[") AS parsx',
'IF(a.data = "0000-00-00",NULL,"]") AS pardx',
'IF(a.estremi = "",NULL,a.estremi) AS estremi'
])
->from($db->quoteName('nuvrj_data_aforismi', 'a'));
setlocale(LC_TIME, 'it_IT.utf8');
// Esegui la query
$db->setQuery($query);
$results = $db->loadObjectList();
// Stampa i risultati
echo '
';
echo '';
foreach ($results as $row) {
echo '';
//echo '| '.htmlspecialchars_decode($row->idafor).' | ';
echo ''.htmlspecialchars_decode($row->aforismi).' | ';
echo '
';
echo '';
//echo '| '.htmlspecialchars_decode($row->idautore).' | ';
echo ''.htmlspecialchars($row->estremi).' ' . htmlspecialchars_decode($row->parsx). '' . htmlspecialchars_decode($row->data). '' . htmlspecialchars_decode($row->pardx). ' | ';
echo '
';
}
echo '';
echo '
';
?>