I am trying to get out data of a SQLite Database and display this data on my website. I am using PHP version 5.6.24 (and I have not the permission to update it).
From this PHP Manual I took the following code:
`
$db = new SQLite3('DB_NAME.db');
$results = $db->query('SELECT * FROM user');
while ($row = $results->fetchArray()) {
var_dump($row);
}`
and I got this output:
array(10) { [0]=> NULL ["Username"]=> NULL 1=> NULL ["FirstName"]=> NULL [2]=> NULL ["LastName"]=> NULL [3]=> NULL ["Authorithy"]=> NULL [4]=> NULL ["ProfilePicture"]=> NULL }
The Attributes of my db are Username, Firstname, ProfilePicture and Authorithy but I want to get the data from the table and not only the header attributes.
How to write such a query?