I have the following code in my connection view settings in body:
The if statement always return to the 'else', although {operatori_economici} = 2. What is wrong?
<?php
echo "<tr>";
if ('{operatori_economici.numero_incarichi}' > 0)
echo "<td bgcolor='red'> ".'{operatori_economici.numero_incarichi}'."</td>";
else {
echo "<td>".'{operatori_economici.numero_incarichi}'."</td>";
echo </tr>;
?>
I have read the post on this forum but did not solve my problem!
The if statement always return to the 'else', although {operatori_economici} = 2. What is wrong?
<?php
echo "<tr>";
if ('{operatori_economici.numero_incarichi}' > 0)
echo "<td bgcolor='red'> ".'{operatori_economici.numero_incarichi}'."</td>";
else {
echo "<td>".'{operatori_economici.numero_incarichi}'."</td>";
echo </tr>;
?>
I have read the post on this forum but did not solve my problem!
Hi mcasamassima,
You can't use the curly brackets syntax in PHP, you need to use the PHP format, I think the following code should work in v5:
And its advised to use v6 for new connections.
Best regards,
Max
You can't use the curly brackets syntax in PHP, you need to use the PHP format, I think the following code should work in v5:
if($row["operatori_economici"]["numero_incarichi"] > 0){
//code here
}
And its advised to use v6 for new connections.
Best regards,
Max
Okay, thanks!
This topic is locked and no more replies can be posted.