Support the ongoing development of Laravel.io →
Eloquent Architecture
Last updated 1 year ago.
0

use stored procedures to do all the calculations with your database as you're already pulling data out of it. Much quicker than querying and using Php to calc.

0

KevinCreel said:

use stored procedures to do all the calculations with your database as you're already pulling data out of it. Much quicker than querying and using Php to calc.

I could do that thanks. But in some calculations i need to return an array and can not do it only by procedures. For example an array to create a chart. Where should i do them?

0

Just loop through the results and create an array.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.