Jump to content

Recommended Posts

Posted

i want to to get a list of top total clients by credit, and to be very correct in our query wich table we should look at . or any built-in query (function) in a blesta model to achieve this goal ?

Posted

Look at the `transactions` table. There is no method to fetch a list of the clients with the most credits. You could, however, loop over every client in the system and call Transactions::getCredits(CLIENT_ID, CURRENCY), then sort them to make your own list, but that would be very slow with the number of queries you would have to execute.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...