ID:               24538
 Updated by:       [EMAIL PROTECTED]
 Reported By:      john at ceressoft dot nl
-Status:           No Feedback
+Status:           Closed
 Bug Type:         SQLite related
 Operating System: Linux
 PHP Version:      5CVS-2003-07-08 (dev)


Previous Comments:
------------------------------------------------------------------------

[2003-10-18 21:41:25] kevin at oceania dot net

Tested this bug with php5beta2 and the problem does not exist
any longer, if it did in the beginning. test script follows...

<?php
/*
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
#SQLite Admin Structure Dump for table testtable
#
CREATE TABLE testtable (fone VARCHAR(99) NOT NULL DEFAULT 'blah', ftwo
VARCHAR(3) NOT NULL DEFAULT 'blahblah', fthree VARCHAR(99) NOT NULL
DEFAULT '')
                                                                       
                                                  
#
### SQLite Admin Data Dump for table testtable
#
INSERT INTO testtable ( one, two, three);
INSERT INTO testtable ( one2, two2, three3);
INSERT INTO testtable ( one3, two3, three3);
INSERT INTO testtable ( one4, two4, three4);
INSERT INTO testtable ( one5, two5, three5);
                                                                       
                                                  
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
                                                                       
                                                  
  // make sure it is broken
  error_reporting(E_ALL);
  // our sql
  $sql = "SELECT * FROM testtable";
  // connect to the db
  $db = @sqlite_open('test.db', 0666, $sqliteerror);
  // run the query
  $res=sqlite_query($db, $sql);
  // set a counter
  $i=0;
  // begin table for layout
  echo '<table border="1"><tr>';
  // get the field names
  while($i<sqlite_num_fields($res))
        {
        // echo the field names
        echo '<th>'.sqlite_field_name($res, $i).'</th>';
        // increment the counter
        $i++;
        }
  // end the table header row
  echo '</tr>';
                                                                       
                                                  
  // loop through the ASSOCIATIVE array
  while($row=sqlite_fetch_array($res, SQLITE_ASSOC))
        {
        // echo out the values
        echo '<tr><td>'.$row['fone'].
'</td><td>'.$row['ftwo'].'</td><td>'.$row['fthree'].'</td></tr>';
        }
                                                                       
                                                  
  // end of table
  echo '</table>';
?>

------------------------------------------------------------------------

[2003-07-15 16:36:27] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.



------------------------------------------------------------------------

[2003-07-08 08:16:52] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


How about a complete self-contained reproducing script? :)


------------------------------------------------------------------------

[2003-07-08 08:05:46] john at ceressoft dot nl

Description:
------------
when fetching data with sqlite_fetch_array as an assioative array, the
data and names mixes wrong up.

Output from print_r:

{0] =>
    [time] => 1057663053
    [app] => OLAF
    [user] => Pakhuis administratie
    [msg] => login, new session

As you can see, columns app and user are exchanged



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24538&edit=1

Reply via email to