I'm not to versed with using joins, so I don't know if it's what i need to use here.
I have several tables in my db. main table is related to other tables by id. for example, i have a table that lists company names, and a unique id for each company. in the main table, there is a field for the company id. now, when I do queries for outputting records from the main table, how do I get the company name to appear and not the id? do i use a join and how do i write that?
secondly, i have a php page that lists all the records in a table with links to a detail page. once getting to the detail page, i again want to substitute the id for the actual name when I output to the screen. again, another join???
thanks for any help. i'm sure i have been more than confusing above...
also, if someone has a good resource for understanding how to properly right SELECT statements, with JOINS, etc, aside from the documentation site (not useful for a newbie), that would also be appreciated.
I have several tables in my db. main table is related to other tables by id. for example, i have a table that lists company names, and a unique id for each company. in the main table, there is a field for the company id. now, when I do queries for outputting records from the main table, how do I get the company name to appear and not the id? do i use a join and how do i write that?
secondly, i have a php page that lists all the records in a table with links to a detail page. once getting to the detail page, i again want to substitute the id for the actual name when I output to the screen. again, another join???
thanks for any help. i'm sure i have been more than confusing above...
also, if someone has a good resource for understanding how to properly right SELECT statements, with JOINS, etc, aside from the documentation site (not useful for a newbie), that would also be appreciated.