Condition on a value returned by the database
Condition on a value returned by the database
Keyser_Soze
Posts: 22Questions: 0Answers: 0
Hi,
I'm using server side processing and i want to make a condtion on values returned by the database:
[code]
if ( $aColumns[$i] == "prolong" )
{
$prolong= $aRow[ $aColumns[$i] ];
if ($prolong='1')
$sOutput .= '"OUI",';
else
$sOutput .= '"NON",';
}
[/code]
The result i get is:
All the values returned on the table are the same; OUI
is there any wrong with this code?
Thanks
I'm using server side processing and i want to make a condtion on values returned by the database:
[code]
if ( $aColumns[$i] == "prolong" )
{
$prolong= $aRow[ $aColumns[$i] ];
if ($prolong='1')
$sOutput .= '"OUI",';
else
$sOutput .= '"NON",';
}
[/code]
The result i get is:
All the values returned on the table are the same; OUI
is there any wrong with this code?
Thanks
This discussion has been closed.
Replies
[code]if ($prolong='1')[/code]
[code]if ($prolong=='1')[/code]
PS: you can delete the subject.