PHP-MySQL (Equity Press)

There is a prospect for promotion where I work, which will have a test on PHP-MySQL, with some expected “gotcha’s”. So I thought I’d prepare early, and get a book which covers “tough interview questions”. Having seen others in this style which really require you to think, and show where people trip over, I expected a lot from this book.

This has got to be the worst book I have ever seen. Some questions give pages and pages of example code, and want you to show how you would fix it. So I looked carefully at the code, thinking there would be a typical small but major error. The answer? “Put echo mysql_error() in the code to see where the error is”. No, that’s not a hint, that was the answer.

This book is a disgrace. “Tough interview questions” should have tough answers. They should NOT be the absolute obvious methods to find and solve common errors.

Another example – a form was being submitted, but the variables were not getting set. Why? The answer again was very stupid – “If register globals is off, we use the superglobals – here they are mistakingly using $_GET, so we switch them with $_POST”. Geez, are you SERIOUS? For one, no one should be using register globals, even though you can effectively counter it with well thought-out code. Secondly, this is a VERY BASIC problem, and one no PHP developer should EVER even end up in. The difference between GET and POST is so trivial, that if someone got those confused, god knows what else they would get stuck on.

The only credit I can give to the book is that it reads like two people having an interview. Someone asks the question as if they’re in a predicament, and the other answers it. But the answers are too trivial. Rather than “add echo mysql_error();” to the code to see what the error is, I’d expect the other person to actually find the error itself and how to fix it. It also keeps the format of the writing throughout, and doesn’t have any additional fluff – it literally just has the questions and a contents page at the front.

Nice try, but make it a LOT tougher, and maybe. It just stinks of “let’s quickly write a book that will get us some extra cash, ah, here we go, a ‘tough’ interview on an easy language covering obvious problems!”

  1. No comments yet.
(will not be published)