This is a list of basic php and related questions, let’s see who knows their stuff.
What does PHP, Apache & MySQL have in common?
Name 2 cool thngs about Open Source Applications
What is the purpose of MySQL?
How many characters can be in a VARCHAR (length) field?
A primary key must be unique and should never have a not NULL value. True/False
Which function helps you to join 2 tables?
Name 3 main types of errors you can find in Web Pages
When does a Parse Error occur?
What 4 elementary actions should you do to avoid errors in your code?
Images file types can be converted in PHP. True/False
Name 2 orders in which you can sort data and give a MySql command for each of these
There are many types of searches, explain the simplest type.
Why would one use the MATCH and WHERE clause in their search code?
Name one way in which your searches can get complicated
Give a brief description of a Relational Database
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)
Why is MySql the perfect choice for providing data via the internet?
What is the typical syntax used to retrieve data by querying a database?
Let’s see who can answer the questions the quickest! Game on!
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).
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.
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.
2^16 - 1.
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.
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.
Typos, bad colour schemes and using XHTML without actually serving it as XML.
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.
Sleep more. Drink less coffee. Pay attention to what you’re writing. Remove oven gloves before typing, after cooking.
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…
What does PHP, Apache & MySQL have in common?
They all contain the letter P (except Mysql)
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
What is the purpose of MySQL?
To give the common man an RDBMS without having to pay for it
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
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.
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)
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
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?”
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
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.
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)
There are many types of searches, explain the simplest type.
Where’s my glasses gone? and Where’s my glass gone? (see #9)
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?”
Name one way in which your searches can get complicated
Combine searches in #12 and #13 above whilst awaiting delivery of #11
Give a brief description of a Relational Database
A bag of rusty nails looking for a role in life
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”
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
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?
What does PHP, Apache & MySQL have in common?
they all irritate the heck out of microsoft fanboys
Name 2 cool thngs about Open Source Applications
the licence fee and the annual support costs
What is the purpose of MySQL?
to irritate object oriented developers
How many characters can be in a VARCHAR (length) field?
depends
A primary key must be unique and should never have a not NULL value. True/False
don’t be ridiculous, it’s false
Which function helps you to join 2 tables?
no such function exists
Name 3 main types of errors you can find in Web Pages
spelling errors, grammar errors, factual errors,
When does a Parse Error occur?
during parsing
What 4 elementary actions should you do to avoid errors in your code?
test, test, test, and document
Images file types can be converted in PHP. True/False
i have no idea
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
There are many types of searches, explain the simplest type.
table scan!!!
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
Name one way in which your searches can get complicated
you’ve used the EAV model for your data
Give a brief description of a Relational Database
it contains stuff
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
Why is MySql the perfect choice for providing data via the internet?
who says it’s perfect? ha ha
What is the typical syntax used to retrieve data by querying a database?
that would be the SELECT statement