Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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 7,861 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 7,861 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