Kevin Yank; PHP & MYSQL: Novice to Ninja

Chapter 6 page 168; I have coded the “jokes” application but when I try to run it I get an error message:
“Error fetching joke: SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected”, which seems to be associated with the “include ‘’;” line. Any ideas why?

OK I’ve discovered what I was doing wrong; the usual hang- up with spaces! dbname=ijdb works, but dbname = ijdb doesn’t. What a waste of time.

1 Like

That’s often the case when you’re learning things (or even when you’re experienced) - the silly little things are what hold you up, not the big complicated ones!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.