QUIZ: Do you know your stuff?

This is a list of basic php and related questions, let’s see who knows their stuff.

  1. What does PHP, Apache & MySQL have in common?
  2. Name 2 cool thngs about Open Source Applications
  3. What is the purpose of MySQL?
  4. How many characters can be in a VARCHAR (length) field?
  5. A primary key must be unique and should never have a not NULL value. True/False
  6. Which function helps you to join 2 tables?
  7. Name 3 main types of errors you can find in Web Pages
  8. When does a Parse Error occur?
  9. What 4 elementary actions should you do to avoid errors in your code?
  10. Images file types can be converted in PHP. True/False
  11. Name 2 orders in which you can sort data and give a MySql command for each of these
  12. There are many types of searches, explain the simplest type.
  13. Why would one use the MATCH and WHERE clause in their search code?
  14. Name one way in which your searches can get complicated
  15. Give a brief description of a Relational Database
  16. Give any basic example of a relational database system used (Ex: Each superhero in a Superhero table has a League_ID that corresponds to an ID in the League table)
  17. Why is MySql the perfect choice for providing data via the internet?
  18. What is the typical syntax used to retrieve data by querying a database?

Let’s see who can answer the questions the quickest! :smiley: Game on!

These posts are funny, but really isn’t useful.

I couldn’t parse your post because of a syntax error in the first question.

This:

What does PHP, Apache & MySQL have in common?

Should be:

What do PHP, Apache & MySQL have in common?

Interesting… okay.

  1. As far as I can see, nothing. Apache is a server designed to handle HTTP requests and return a page, using the driver it deems necessary. One of these is PHP. MySQL is software which PHP has, again, drivers to access. They’re used in web development, but so is a web browser (developing without using the browser regularly is like painting without looking at it regularly).

  2. Open Source is generally a competitor to commercialism. Open Source applications are growing as fast as commercially built ones, thanks to the people who (a) gain benefit from product growth, (b) want their name on (potentially) widely used software, (b) just want to do some honest good for others or (d) have too much spare time on their hands. So essentially the main benefit it is often allows cheaper/free software of similar quality, and it also saves the energy used in producing, transporting and disposing of the tissue paper that many of the regular contributors under category (d) would pretty likely be using up with their otherwise spare time.

  3. It makes data storage, managing and retrieval easier and faster. What I want to know is this: What is the purpose of a duvet? Why do humans have such a comfort requirement when dogs are happy with what they also wear throughout the daytime.

  4. 2^16 - 1.

  5. False. It should always have a non-null value. I suppose one record may have a primary key equal to null but, being unique, none of the others should.

  6. Lots of variations. You’re probably thinking of INNER JOIN, but LEFT JOIN, UNION and nested queries TECHNICALLY join 2 tables. Just with different results.

  7. Typos, bad colour schemes and using XHTML without actually serving it as XML.

  8. When you have had too much coffee and not enough sleep. Or when you’re using an outdated PHP version and are trying to use namespaces.

  9. Sleep more. Drink less coffee. Pay attention to what you’re writing. Remove oven gloves before typing, after cooking.

  10. True, kind of. The image function is handled by GD, so is technically C, but PHP calls the library.

Battery is dying on the laptop, so I will continue tomorrow if I remember. I’m annoyed there were no architecture or library development questions. Got my hopes up a bit…

These are all some pretty stupid, open ended questions fyi – school test? None the less, I left school a while ago – do your own damn homework – kids these days gesh…

Haha! Might be… :wink:

  1. What does PHP, Apache & MySQL have in common?
    They all contain the letter P (except Mysql)
  2. Name 2 cool thngs about Open Source Applications
    You can truthfully pronounce you are working on either “Open Sauce Applications” or “Open Sores Applications” at conferences and people think you have some credibility without you actually lying
  3. What is the purpose of MySQL?
    To give the common man an RDBMS without having to pay for it
  4. How many characters can be in a VARCHAR (length) field?
    “VARCHAR (length)” can be 16 chars if you count spaces, or 15 if you do not
  5. A primary key must be unique and should never have a not NULL value. True/False
    True/False - always equates to False in an if statement.
  6. Which function helps you to join 2 tables?
    A large bag of rust nails is usually enough to join 2 tables (unless they are made of glass)
  7. Name 3 main types of errors you can find in Web Pages
    Poor usability, poor design or the mistaken belief that the creation of a webpage will lead to unbelievable riches
  8. When does a Parse Error occur?
    When a woman who lives in the Sloan area of London cannot find her purse: “Dahhling, seen my parse anywhare?”
  9. What 4 elementary actions should you do to avoid errors in your code?
    Turn the computer on first, do not drink alcohol when coding, keep your eyes open, avoid using a french keyboard (or german) if you do not speak their language
  10. Images file types can be converted in PHP. True/False
    True - uploaded images can be lost, or renamed or accidentally swapped with other ones therefore giving the impression that PHP has indeed manipulated your image - also many Java programmers see PHP programmers in a very dim light, which is bad for our images.
  11. Name 2 orders in which you can sort data and give a MySql command for each of these
    The two most common orders given by serious LAMP developers are to order pizzas or to order curries (we don’t order beer, that is expected to be supplied)
  12. There are many types of searches, explain the simplest type.
    Where’s my glasses gone? and Where’s my glass gone? (see #9)
  13. Why would one use the MATCH and WHERE clause in their search code?
    “Sod this, I’m off for a smoke - anyone seen WHERE I put my MATCHes?”
  14. Name one way in which your searches can get complicated
    Combine searches in #12 and #13 above whilst awaiting delivery of #11
  15. Give a brief description of a Relational Database
    A bag of rusty nails looking for a role in life
  16. Give any basic example of a relational database system used (Ex: Each superhero in a Superhero table has a League_ID that corresponds to an ID in the League table)
    Select * from Superhero where title = “AllwaysSelectStarMan” and skill = “fetching unnecessary data”
  17. Why is MySql the perfect choice for providing data via the internet?
    Its free and we are all just a bunch of cheapskates and have no idea of what the RDBMS should be doing, or if we should even be using one
  18. What is the typical syntax used to retrieve data by querying a database?
    Hang on shouldn’t we just cache this result in a file - nothing has changed in this database in the last month?

HTH

  1. What does PHP, Apache & MySQL have in common?
    they all irritate the heck out of microsoft fanboys
  2. Name 2 cool thngs about Open Source Applications
    the licence fee and the annual support costs
  3. What is the purpose of MySQL?
    to irritate object oriented developers
  4. How many characters can be in a VARCHAR (length) field?
    depends
  5. A primary key must be unique and should never have a not NULL value. True/False
    don’t be ridiculous, it’s false
  6. Which function helps you to join 2 tables?
    no such function exists
  7. Name 3 main types of errors you can find in Web Pages
    spelling errors, grammar errors, factual errors,
  8. When does a Parse Error occur?
    during parsing
  9. What 4 elementary actions should you do to avoid errors in your code?
    test, test, test, and document
  10. Images file types can be converted in PHP. True/False
    i have no idea
  11. Name 2 orders in which you can sort data and give a MySql command for each of these
    up and down… the command is SELECT
  12. There are many types of searches, explain the simplest type.
    table scan!!!
  13. Why would one use the MATCH and WHERE clause in their search code?
    MATCH isn’t a clause, and you cannot do a search without WHERE
  14. Name one way in which your searches can get complicated
    you’ve used the EAV model for your data
  15. Give a brief description of a Relational Database
    it contains stuff
  16. Give any basic example of a relational database system used (Ex: Each superhero in a Superhero table has a League_ID that corresponds to an ID in the League table)
    facebook is a great example
  17. Why is MySql the perfect choice for providing data via the internet?
    who says it’s perfect? ha ha
  18. What is the typical syntax used to retrieve data by querying a database?
    that would be the SELECT statement

This looks more like a database (well MySQL) quiz then a PHP quiz.
Only four of the questions have no mention of MySQL or database related.