Wednesday, 17 November 2010

phpMyAdmin shown bad data for same column names

(phpMyAdmin 2.2.3)

I have run the SQL with some joins and as the result I had two columns named name:
FROM ...

As a result I got two columns with same name and same values (both had values). This was not the case when I tried to run the same SQL on database directly.

The solution is simple - just set some different aliases for those columns:
    competitor.*, AS club_name, AS class_name
FROM ...

No comments:

Popular Posts