At 10:50 AM +0100 5/22/11, Ashley Sheridan wrote:
but I also give the table a moniker which lets me shorten the
queries as I type:
SELECT p.id, p.name FROM people p WHERE p.gender = 'male'
This way, I can easily join in other tables, my typing is kept to a
minimum as I do it also.
Whenever I see p.id (or similar) I think there is a join coming.
So, I always use:
SELECT id, name FROM people WHERE gender = 'male'
Unless there a join, such as:
SELECT p.id, p.name, a.total FROM people p, accounts.a WHERE gender = 'male'
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php