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 trialDan Badertscher
5,327 Points(MySQL) Error: Error formatting SQL query: empty string given as argument for ! char
I am getting the following error message:
" 19:11:32 SELECT * FROM movies LIMIT 0, 1000 Error: Error formatting SQL query: empty string given as argument for ! character "
after running this command:
SELECT * FROM movies ;
How can I get this command to work properly?
2 Answers
Shawn Flanigan
Courses Plus Student 15,815 PointsHi Dan,
According to this post on Stack Overflow, you may not have your database selected. In the left panel, try double-clicking the database you want to use (it will be bold when selected), then run your query again.
Hope that helps!
anthony crowell
Courses Plus Student 10,953 PointsHi I'm not sure how many records are in that table but you might try upping your LIMIT and using the schema name: SELECT * FROM treehouse.movies LIMIT 0, 2000;
Matt Krey
5,333 PointsThank you, Shawn. This worked for me as well... Lots of interesting little challenges here with the differences between the videos and what we see with the latest version of MySQL.
Dan Badertscher
5,327 PointsDan Badertscher
5,327 PointsThat worked. Thanks Shawn!
Stephen Moss
2,285 PointsStephen Moss
2,285 PointsThanks! Had the same problem
Tammy Burke
9,720 PointsTammy Burke
9,720 PointsWoohoo! Love a simple answer.
Mario Sanchez
3,037 PointsMario Sanchez
3,037 Pointsthanks!