Syntax:
SELECT col_name [, col_name] ...
    INTO var_name [, var_name] ...
    table_expr

SELECT ... INTO syntax enables selected columns to be stored directly
into variables. The query should return a single row. If the query
returns no rows, a warning with error code 1329 occurs (No data), and
the variable values remain unchanged. If the query returns multiple
rows, error 1172 occurs (Result consisted of more than one row). If it
is possible that the statement may retrieve multiple rows, you can use
LIMIT 1 to limit the result set to a single row.

URL: http://dev.mysql.com/doc/refman/5.1/en/select-into-statement.html

