sql - How to get a name of a foreign id -
I'm trying to get the name of my sub-id
my table looks like this Is
id Sub_id | Title 1 0 | Home 2 | 0 | About 3 | 2 | About sub 4 3 | Third sub So I will need the title of sub-id2 which will be about about so far I am only able to get the ID and not the title < P> This selection statement is $ id current page, which I am about, which will be about sub. Choose sub-id from the menu where id = '. $ Id. '
An auto-insert: join the same table twice
select t1. *, Your2table t1 to t2.title t1.sub_id = t2.id is included in your_table t2
Comments
Post a Comment