mysql help
Posted: Fri May 14, 2010 10:51 pm
hello,
I am embarking on new territory by advancing my skills in mysql.
I am currently working with LEFT JOIN, but while I was working on example, I noteced that the example was almost renaming the table while running the query...see the following...
My database has the following tables
company category company.category
the mySQL query looked like this:
SELECT ct.name FROM category ct
LEFT JOIN company_category cc ON ct.id = cc.category_id
LEFT JOIN company c ON cc.company_id = c.id
WHERE c.id = 2
so, this snippet: category ct
and this: ct.name
whats up with that? Where does the CT come in to play?
I am embarking on new territory by advancing my skills in mysql.
I am currently working with LEFT JOIN, but while I was working on example, I noteced that the example was almost renaming the table while running the query...see the following...
My database has the following tables
company category company.category
the mySQL query looked like this:
SELECT ct.name FROM category ct
LEFT JOIN company_category cc ON ct.id = cc.category_id
LEFT JOIN company c ON cc.company_id = c.id
WHERE c.id = 2
so, this snippet: category ct
and this: ct.name
whats up with that? Where does the CT come in to play?