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 PHP & Databases with PDO Getting Started With PDO Introductions

Unable to open database in the SQLLITE 3 error which says unknown comman or invalid arguments appears once i try to open

Please help

3 Answers

Bryan Manhollan
PLUS
Bryan Manhollan
Courses Plus Student 10,096 Points

To clarify the above answer (because I had trouble with it to). You have to type this in from the original console prior to opening sqlite3. Which will look something like this:

treehouse:~/workspace$ sqlite3 database.db

This will open sqlite3 in your console as well as add database.db to your databases.

Then just use .databases to see the database, don't use .open

Bryan Manhollan
Bryan Manhollan
Courses Plus Student 10,096 Points

You don't need to. If you type .databases you should see it listed.

Robert Rodriguez
Robert Rodriguez
3,796 Points

Thank you for posting this workaround to the issue. I was getting frustrated that I wouldn't be able to complete this important topic.

Gyver Vick
Gyver Vick
5,347 Points

I initially had the same problem as you, but I tried using the following syntax, and it worked.

sqlite3 database.db

Thank you so much guys. I was able to solve the problem