MySQL Query as Field Type

More
14 years 9 months ago #5107 by William
Hi All

Please assist ...

I'd like to add a MySQL query in an Article template but my field type list does not show such a field type .. although the tutorials suggest its listed ...

Ta
William.

Please Log in or Create an account to join the conversation.

More
14 years 9 months ago #5108 by yopyop001
Replied by yopyop001 on topic MySQL Query as Field Type
Hi,

Can you post a screenshot of the field parameters and the query you are using?

Rgds

Please Log in or Create an account to join the conversation.

More
14 years 9 months ago #5111 by William
Replied by William on topic MySQL Query as Field Type
Hi

THX! .. THe Query is a basic one ... selecting a field from a table in joomla database ..
Attachments:

Please Log in or Create an account to join the conversation.

More
14 years 9 months ago #5114 by yopyop001
Replied by yopyop001 on topic MySQL Query as Field Type
The SQL query will work only with the following field type:

- select
- select multiple

In the parameters of these fields you have :
Use SQL Query (set Yes)
And write your query in the field 'Field Elements'

Syntax :
Code:
Select ... as value, ... as text from ...

It will generate a select list with the returned rows of your query.

I hope it will help you

Please Log in or Create an account to join the conversation.

More
14 years 9 months ago #5126 by William
Replied by William on topic MySQL Query as Field Type
Merci!

Have a good evening!

Please Log in or Create an account to join the conversation.

More
14 years 9 months ago #5137 by William
Replied by William on topic MySQL Query as Field Type
I see the query working on the ITEM page ... but it seems the TEMPLATE [default[ does not read the field in i..e it does not display on the webpage ... what am I doing wrong?
:)

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.518 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline