Friday, August 10, 2007

Cheating

Last week we looked at creating a table, inserting some information and showing the results.

You could have written the code from scratch - or done the smart thing and used phpMyAdmin's 'show php' feature.

This will take you a long way towards most of the things you want your web pages to do, but you might need some help getting phpMyAdmin to do its tricks in the first place - which is where the ilovejackdaniels cheat sheet comes in handy.

This page will list the common select statements and functions - and contains enough information for you to accomplish the following performance criteria:

Write an SQL statement that selectively retrieves data
  1. Restrict the number of rows retrieved by placing criteria in the 'where' clause

  2. Restrict the number of rows retrieved by placing specific criteria in the select statement

  3. Use comparison operators in the 'where' clause to compare numeric, character, string, date and time data

  4. Use Boolean operators with the correct precedence

  5. Use criteria in the 'where' clause to check for a range of values, to select values from a list, and to check for values that match a pattern

  6. Use SQL syntax to suppress duplicate values from query results

  7. Take action to exclude null values from a query result


Write SQL statements that use functions
  1. Use arithmetical operators with the correct precedence

  2. Use string functions and operators to obtain the required query output

  3. Use mathematical functions to obtain the required output, where required

  4. Use date functions to obtain the required output

  5. Use SQL aggregate functions to obtain the required output



Go on, try it out (you won't regret it)


Image: 'Blatent Cheating'
www.flickr.com/photos/81719291@N00/88894036

1 comment:

Jude said...

Oh those bothering bees
http://www.jude-r.blogspot.com/
Judy"s spotting bog