I have a questionnaire which adds an 1 or a 0 to my DB. If the value is 0 this means the questions' answer was yes, if 1 the answer was no. what I need to do is run an if statement whereby the data for multiple statements are provided. some how the code only execute one "if statement" and I need it to execute multiple statement and return data associated with the relevant variable.
I have tried the following code '
    <?php
$results=$db->query("SELECT *
        FROM
            client_scope 
        WHERE
            client_scope_id = $siteID AND client_Id=
            '{$_SESSION['clientId']}'");
    $condition1= 1;
    $condition2= 4;
    foreach($results as $row){
        echo '<p> test';
        // if condition1 in db has been set and value equals to 0 echo data 
    if(isset($row['column_1'])){
        // echo $_SESSION['projectName'];
        if($row['column_1'] == 0){
            foreach($results1 as $row){
            echo '<tr>
            <td
            >'.$row['sectionName'].'</td>
            <td
            >'.$row['sectionRef'].'</td>
            <td
            >'.$row['requirement'].'</td>';
                } 
            }
        } 
      // if condition2 in db has been set and value equals to 0 echo data
    if(isset($row['column_2'])){
        if($row['column_2'] == 0){
            echo 'step in';
            foreach($results2 as $row){
            echo '<tr>
            <td
            >'.$row['sectionName'].'</td>
            <td
            >'.$row['sectionRef'].'</td>
            <td
            >'.$row['requirement'].'</td>';
                } 
            } 
        }
     }
     ?>
'
 
    