works under mysql 5 but not under Oracle 11g1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



//construct a global variable for the form profile
$fields = array("fdate", "actype", "acid", "nlandings", "nhours");

problem down in while loop
.. . . . . .
function displayDeleteForm(){
    //get $fields into the function namespace
    global $fields;                          
        global $conn;                        
/* Create and execute query. */              
//     $query = "select * from log_book_id"; 
//     $result = mysql_query($query);        
// Loop through each row, outputting the actype and name
     echo <<<HTML                                       
    Pilots Logbook entries stored in mySQL Relational Database
under Redhat Fedora 8 Linux                                   
    <form action="{$_SERVER['PHP_SELF']}" method="post">      
    <table width="50%" align="center" border="1">             
    <tr>                                                      
        <th>checked</th>                                      
        <th>rowID</th>                                        
        <th>fdate</th>                                        
        <th>actype</th>                                       
        <th>acid</th>                                         
        <th>nlandings</th>                                    
        <th>nhours</th>                                       
    </tr>                                                     
HTML;                                                         

    //get log_book_id table information
    $user = "select * from log_book_id";
    $result = oci_parse($conn, $user);  
        $r = oci_execute($result);      

    //display log_book_id information
    $count = 0;                      

    while ($newArray = oci_fetch_assoc($result)) {
        foreach ($fields as $field){              
            ${$field} = $newArray[$field];        // values not making it into variable
             
        }                                         
        
        $rowID = $newArray['rowID'];              

        //note that we do not rely on the checkbox value as not all browsers submit it
        //instead we rely on the name of the checkbox.                                
        echo <<<HTML                                                                  
    <TR>                                                                              
        <td>                                                                          
            <input type="checkbox" name="checkbox[$rowID]" value="$rowID">Check to delete record
        </td>                                                                                   
        <TD>$rowID</TD>                                                                         
        <TD>$fdate</TD>                                                                         
        <TD>$actype</TD>                                                                        
        <TD>$acid</TD>                                                                          
        <TD>$nlandings</TD>                                                                     
        <TD>$nhours</TD>                                                                        
    </TR>                                                                                       

HTML;

    }    // while
    echo <<<HTML 
    <tr>         
        <td colspan="7">
            <input type="submit" name="delete" value="delete checked items"/>&nbsp;
            <input type="submit" name="new" value="New Log Entry" />&nbsp;         
            <input type="reset" name="reset" value="Reset Form" />                 
        </td>                                                                      
    </tr>                                                                          
    </table>                                                                       
    </form>                                                                        
                                                                                   
HTML;                                                                              
}    //close function                                                              




      


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux