View Single Post
Old 06-26-2007, 12:08 AM   #3
Pawel Ratajczak
 
Pawel Ratajczak's Avatar
 
Posts: n/a
My Photos: ()

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Order by column from other table

Mark Huizer <xaa+news_alt.comp.databases.mysql@dohd.org> wrote in
news:slrnf2f21r.2h42.xaa@eeyore.local.dohd.org:

> something like
> select * from table1 join table2 using(id) order by table2.stringfield ?
>


I've checked this in MySQL Query Browser and the result was an arror with
message:
Unknown column 'category_id' in 'from clause'
Error code: 1054

category_id is the name of the column in table1 with int values I wanted to
replace with strings and order by them.

Full query looked like this:
select * from expenses join category using(category_id) order by
category.name;

Any idea what is wrong?

Thanks for any help in advance.

--
Best regards,

Pawel Ratajczak

PS. User form email is written in reverse order ;-)
  Reply With Quote