Page 1 of 1

How TO Use MSSQL views in PHP ?????

Posted: Sat May 31, 2003 3:24 am
by sacfreak
hi,
i want to know how to use mssql views in MSSQL and especially pass parameters.....so that only specific results can be extracted.
Please help..

Posted: Sun Jun 01, 2003 9:57 pm
by fractalvibes
In my experiences ( not with MS SQL though), a view is treated exactly like a table as far as the developer is concerned.

Say you had a table of members of some organization, they have various statuses, active, inactive, delinquent, what not. Say some of these members subscribe to some different services; publications, insurance, special widget service, whatever.

If warrented, you could create a view such that it contained only active members who subscribe to ABC service. You can write parameterized SQL queries against that view and give any other conditions needed. Just like any other table. A view is simply a subset of 1 or more tables, defined by the SQL that created the view.

Phil J.