dmcv Posted February 13, 2009 Share Posted February 13, 2009 I am astarter and working from a book. Can anyone tell me what this means please.... SELECT ft.topic_id, ft.topic_title FROM forum_posts ... I do not understand the ft. also, later in the same command i have... AS fp LEFT JOIN ..again what is the fp? I understand what the listing is doing but cannot find anywhere in the book and explanation for the ft. and fp, which I assume are somewhow limiting or concatinating the fields in the table. Link to comment https://forums.phpfreaks.com/topic/145078-select-from-as/ Share on other sites More sharing options...
Maq Posted February 13, 2009 Share Posted February 13, 2009 fp is an alias for the table "forum_posts". It's just a shorter way to reference that table. Link to comment https://forums.phpfreaks.com/topic/145078-select-from-as/#findComment-761291 Share on other sites More sharing options...
Mchl Posted February 13, 2009 Share Posted February 13, 2009 Somewhere later you probably also have ... forum_topics AS ft This is called alias (like Maq already said) and is used as a shorthand, so taht you don't have to write whole table name each time you want to use it (it has some more uses, but you'll learn later about them). When you have: ft.topic_id it means 'topic_id' from table 'ft' and table 'ft' is same as 'forum_topics' due to alias. Link to comment https://forums.phpfreaks.com/topic/145078-select-from-as/#findComment-761295 Share on other sites More sharing options...
dmcv Posted February 13, 2009 Author Share Posted February 13, 2009 Thank you both Great help Link to comment https://forums.phpfreaks.com/topic/145078-select-from-as/#findComment-761339 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.