This isn't a complete question, but I was just wondering if there was a better or more elegant way to set a variable to the count of the number of rows from a mysql select statement. Currently, what I have is:
SET @myCount =
(SELECT COUNT(*)
FROM table1
WHERE aCondition = TRUE);