Jump to content

SELECT .... FROM ..... AS


dmcv

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.