0

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?

1 Answer 1

1

That result indicates there is one row in the user table, and all the column values are NULL.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.