Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP CRUD Operations with PHP Project Setup Connecting to the Database

Please where is the database.sql in the attached project files?

The database.db file in the project folder is not working with phpmyAdmin. I'm getting an error while trying to import the database.db into my local development environment. The error says: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SQLite format 3' at line 1

2 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

This has confused me at certain times too. the database file was created for you as part of the project and is hidden away as it is a different type of file that can't easily be edited in a text editor. It's a binary file and one that is created in a command-line application.

It might be work looking at the files and see what queries you're using in your functions.php file. Any changes will override what is currently in your database file.

There is a database.sql file linked to in the notes for the Reading Project Data video. This is the first video in the next section of this course.