Custom Views and Execute Scalar

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
FedeLopez
User
Posts: 109

Custom Views and Execute Scalar

Post by FedeLopez »

Hi everyone... I had a page that add some Code to a file depend on max/min table values.
The page was a DataBase View, something like any sports standings, resalting best and worse teams.
Thing is that my free server hosting doesn't allow Database Views to be stored.. so I had to move the view to a Custom View.
The problem came later... I did calculate MAX and MIN values of each column using ExecuteScalar against DataBase view, but I can't run ExecuteScalar against a Custom View, didn't?
So... how can i calculate the max value in each column to Highlight them?
P. e.
Rank - PlayerName - Points - Assists
1st - Peter - 20 (Max) - 15
2nd - John - 19 - 12 (Lower)
3rd - Astrid - 15 (Lower) - 18 (Max)

Thanks in advance


arbei
User
Posts: 9719

Post by arbei »

FedeLopez wrote:

but I can't run ExecuteScalar against a Custom View, didn't?

No, the Custom View is only a SQL, it does not exists in the database, but you only need to change the FROM clause to the actual table in your database.

It is recommended that you upgrade to a hosting plan that support database views in the long run.


Post Reply