F.schettino
Italian
I have a table (List) in which I store user information
I need Joomla information on the List
At the moment, I added a Calculation element to get Blocked/unblocked.
It works, also on the List: if I block/unblock an user, the Calculation element shows the right value ("Si" or "No"), but if I filter the list using "Si" or "No", the list shows no records.
Probably it depends on the fact that in the database I see NULL instead of "Si" or "No".
What I wrong?
Can someone help me, please?
The code in Calculation element is:
id ..... id_Joomla .....
I need Joomla information on the List
Blocked , Group_ids
At the moment, I added a Calculation element to get Blocked/unblocked.
It works, also on the List: if I block/unblock an user, the Calculation element shows the right value ("Si" or "No"), but if I filter the list using "Si" or "No", the list shows no records.
Probably it depends on the fact that in the database I see NULL instead of "Si" or "No".
What I wrong?
or
There is an other way to get what I need?Can someone help me, please?
The code in Calculation element is:
PHP:
$id_utente = (int)'{fabrik_nominativi___id_Utente_Joomla}';
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query = "SELECT block AS Bloccato_Si_No FROM nuvrj_users WHERE id = " . $id_utente;
$db->setQuery($query);
$bloccato = $db->loadResult();
if($bloccato == 0)
{$bloccato_si_no = "No";}
else
{$bloccato_si_no = "Si";}