Display a table from MYSQL query, not from database

germanian

Member
Is it possible to display a list in fabrik that is generated from a MYSQL query? I dont want show the existing MYSQL table itself. I just want to display an calculated overview of this table.

As Example:

existing Table contains:
Date / Value
2014-04-09 / 1000

2014-04-01 / 2100
2014-03-16 / 4300
2014-03-06 / 2300
2014-03-01 / 1050

2014-02-23 / 5100
2014-02-01 / 7400

I want show:
Month / Sum
2014-04 / 2200
2014-03 / 7650
2014-02 / 12500

The result should be calculated in the runtime. I can do this with a mysql query or with php. But the calculated result list should be displayed at fabrik, because the users loves the existing template. Is there are way for it?
 
Easiest way would be to create a MySQL view (with e.g. phpMyAdmin) and link a Fabrik list to this view.
(This list will be readonly, so add/edit/delete access should be nobody)
 
Sounds good. Ive tried it immediateley. On phpMyAdmin Ive created a view with the name 'testtableview' with the query:
SELECT id, name FROM my_archive
This view works with phpMyAdmin, i can see the data.

Then Ive generated a list in fabrik and then ive tried to view data on the list. Im getting this error:
Unknown column 'testtableview.' in 'field list' SQL=SELECT SQL_CALC_FOUND_ROWS DISTINCT `testtableview`.`id` AS `testtableview___id`,
`testtableview`.`id` AS `testtableview___id_raw`,
`testtableview`.`name` AS `testtableview___name`,
`testtableview`.`name` AS `testtableview___name_raw`,
`testtableview`.`` AS slug
, `testtableview`.`` AS `__pk_val`
FROM `testtableview` LIMIT 0, 10


Joomla 3.2.3 stable, fabrik 3.1rc2

Could you help?
 
Did you define the primary key element in list settings?

Version:
the recent download version is fabrik3.1
if you are running Joomla3.2.3 you should update from GitHub (there was a fix for J!3.2.3)
 
Defining the primary key was successfully. Thank you so much.

No, i will not update from GitHub again. Ive tried this two times. The result was: A blank page, the logs are empty, Joomla frontend and backend crashed. I was forced to copy back my backup two times. Anyway, thank you for your help with the tableview. It has opened any doors for me now :c)
 
I can't see a problem with GitHub update.
You must use the joomla3 branch.
Without update you can't use modal stuff in J!3.2.3 (e.g. set search all elements in list settings, prefilters in menu items etc.)
 
If you won't use github, there's very little point posting asking for help with issues, as all fixes go in github, and any reply from staff about potential issues is going to start with "are you running the latest github".

To avoid issues with your live site, what we recommend is the standard practice when running live sites, of applying updates to a "sandbox" (test site) first. Use something like Akeeba, which lets you create a clone of your site in just a few mouse clicks. This goes for any significant or "bleeding edge" update to J! or any other extension.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top