Blog Details

Sql join from the same table



                                

here you need to use alias name.... SELECT a.id, a.name, a.tag_id, b.name AS tag_name FROM tags AS a LEFT JOIN tags AS b ON a.tag_id = b.id ORDER BY a.tag_id DESC


Categories

Php mysql

Latest posts

13.05.14
Implementing CRUD Operations ΒΆ

<ul> <li>Now comes the fun part. We would like t

13.05.14
View

<ol> <li><a href="http://www.yiiframework.com/do

13.05.14
Creating Model

<ol> <li><a href="http://www.yiiframework.com/do

Get Free Quote