Buy Now
Sign in

read data group by conditions

peppelaria , May 18 at 16:05
Answered
peppelaria
Hi Bob.
There is some way in chronoforms 6 to set read_data group by days?
eg in mysql: GROUP BY​
​ DAY(Access.created)
thanks in advance for your help.
GreyHead
Hi peppelaria ,
Does the Group Fields box in the Read Data action do what you need?
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
peppelaria
no, it doesn’t.
the string “DAY(Access.created)“ is treated like a table field and the query returns an error because that field doesn’t exists
peppelaria
Hi Bob. coffee coming soon. Have a nice day
peppelaria
Anyone have a working solution for this?
healyhatman
Put
DAY(Access.created):model.name
in the "Fields to retrieve", and "model.name" in the group by
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
peppelaria
thanks helyhatman, it works like a charm,
but wath if i need to get something lyke this: "SELECT DATE_FORMAT(`Sale.created`, "%Y-%m-%d") AS `Sale.created`"?
healyhatman
EDIT: everything needs to have a space separating it
DATE_FORMAT(Sale.created , "%Y-%m-%d"):Sale.created
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
peppelaria
great. it works.
thank you very mutch