Hi,
How to use the 'fields' field for query's?
If I use 'Field' -> works
If I use 'AVG(Field)' -> works
If I use 'Round(AVG(Field),1)' -> error: 1054 - Unknown column 'Model1.AVG(Field' in 'field list'
What went wrong??
When you need to use complicated list of fields/functions then its suggested that you try this:
:Round(AVG(Field),1)
Just add a ":" at the beginning, this skips any field processing for this field.
Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Thanks!
Tried that solution and get the following error:
1064 - You have an error in your SQL syntax
The problem is imo that Chronoconectivity doesn't process the query very well.
Chrono output: Round(AVG(Field) AS `Round(AVG(Field)`, `Model1`.`1)` AS `Model.1)`
Desired output: Round(AVG(Field),1) AS Model1.Field
Seems that each query with a comma in it gives problems...
then just use
:Round(AVG(Field),1) AS Model1.Field
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
And yes, you can't use a comma here, or the parser will think its a start for a new field name.
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
The parsers thinks its a start for a new field name after the comma in the query :? .
:Round(AVG(Field),1) AS Field
Gives the following error:
Round(AVG(Field) AS `Round(AVG(Field)`, `Model1`.`1) AS Field` AS `Model1.1) AS Field`
Yes, you can test it without the ",", check if it works ? in the mean time there is no solution for this, but I have added this to the todo list, the solution proposed is to also support the same conditions format:
return array("field1", "field2");
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Normal AVG() query works without ",". ROUND(x,x) won't work.
Would be very nice if you create a solution. /me tries to bribe you with beer😀
its on the todo list now, but maybe it will take at least 2 weeks to finish!
Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Hi,
Have you finished it?
Regards,
Smurf
Hi smurf,
Apologies for not replying sooner!
Its on the todo list but still not finished, but I will give it priority now, could you please send me a message using the contact us page to get the patch file once its finished ?
Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?