MySQL totally

 SELECT option as value, name as text from jos_components where parent  = 0 and enabled=1 order by name

I've got a table jos_components that have area title option. I wish to run above query however it provides me with a mistake.

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'option as value, name as text from jos_components where parent   = 0 and enabled=1' at line 1 

What is the problem?

option is really a MySQL reserved word. You will need to surround it with backticks inside your query. Do this:

SELECT `option` as value, name as text from jos_components where parent  = 0 and enabled=1 order by name