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 PDO Queries & Results Queries with PDO

Jun XIE
Jun XIE
10,363 Points

Does anybody meets the problem as mine that the workspace doesn't work?

After I saved the Workspace provided, I try to preview, but nothing expected happened no matter how I change the code. It has been so for quite a long time, but I don't want to bear it any more. Dose anybody meets the same problem? Anybody knows how to fix it? Thanks in advanced!!!

Please post a snapshot to your workspace. You do that by clicking the camera icon on the upper right and following the steps until you get a URL you can copy and paste here. I am willing to bet you have an error that is preventing the preview.

1 Answer

Jun XIE
Jun XIE
10,363 Points

Thank you, Sumner. This time I chose 'launch different workspace' rather than the green button 'launch it' after I clicked the 'launch workspace' button. Then the preview finally shows what I expected for one time. Now the problem is that if I changes code to see effects, then I save and preview again, however the preview doesn't have any changes. i.e. the preview doesn't reflect the code changes at all. I got the URL: https://w.trhou.se/kr9ieftd1g as you indicated , and I am testing using the course of 'Managing Errors' from the 'PHP & Databases with PDO'.

Here is an example tragedy that I went through. First I tried the correct code, then preview shows "object(PDO)#1 (0) { }" which is as I expected, then I tried giving wrong code purposely, preview gave me the same message "object(PDO)#1 (0) { }". So I leave it aside, the trick is after 15mins, I preview again, it gave me message "SQLSTATE[HY000] [14] unable to open database file" which is as I expected, then I tried and used correct code again, but preview still gave me "SQLSTATE[HY000] [14] unable to open database file". So I totally don't know the temper of this workspace. Sometimes it works and sometimes it acts like out of control.