Condition on a value returned by the database

Condition on a value returned by the database

Keyser_SozeKeyser_Soze Posts: 22Questions: 0Answers: 0
edited January 2011 in General
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

Replies

  • Keyser_SozeKeyser_Soze Posts: 22Questions: 0Answers: 0
    edited January 2011
    Oups! I've found the error :p

    [code]if ($prolong='1')[/code]

    [code]if ($prolong=='1')[/code]

    PS: you can delete the subject.
This discussion has been closed.