Member Login

Freestyle Joomla Forums

Includes: Code

Member Login   Register

Please login or register to post on the forum

Forum Index    Board Index    Last Post   

Ross Bingeman

Ross Bingeman

22 March 2017, 07:28

Table content Field list

Has anyone got any examples as to how to list a table content using either code pro or data pro versions of freestyle? As an example I have a table called companys with fields called name, address1, address 2 etc etc The fields are not a direct part of any creation through freestyle. I would normally access them via jdatabase or mysql
Link showing problem None to show
Joomla Version 3.6.5
Freestyle Version v1.7.1.2080
Pro/Lite Pro
Harry Shaw

Harry Shaw

24 March 2017, 16:00

Re: Table content Field list

Hello,

You can do with data pro by setting up a SQL data source.

Thanks

Harry Shaw
Freestyle Joomla
Harry Shaw

Harry Shaw

24 March 2017, 16:00

Re: Table content Field list

Hello,

You can do with data pro by setting up a SQL data source.

Thanks

Harry Shaw
Freestyle Joomla
Ross Bingeman

Ross Bingeman

24 March 2017, 19:08

Re: Audit Message

Hi

Thanks for feedback, got it working however I'm trying to sort the output alphabetically and using the following still gives me the output as it is straight from the DB:

SELECT `name` AS `text`, `name` AS `value` FROM `companys` WHERE 1 ORDER BY 'name';

any ideas?
Harry Shaw

Harry Shaw

25 March 2017, 12:26

Re: Table content Field list

Hello,

We think the structure you need to use should be something like this:

SELECT column1, column2, ...
FROM table_name
ORDER BY column1, column2, ... ASC;



Hope this helps.

Harry Shaw
Freestyle Joomla
Ross Bingeman

Ross Bingeman

25 March 2017, 14:26

Re: Audit Message

Hi

Thanks for input, have resolved exactly as follows:

SELECT `name` AS `value` FROM `companys` ORDER BY `name` ASC;


---------------------------------------------------------------------------
name is the name of the column
companys is the name of the table within the DB

Everything is now listed in alphabetical order

Thanks

Vote For Us!

Please vote for our software or write a review of one of our products on the Joomla! Extensions Directory