Re: SQL beginner help



Jon Slaughter wrote:

In SQL Server you have security "groups" and users can join one or
more groups. So a certain group may have read + write access over one
table while another group only has read access. I do not know if this
is how it works in MySQL or not. To accomplish your goal of users
having access to only certain rows in a table is going to require some
server-side code outside of the group security to determine if the
user should be able to access a certain row.


Ok, but what is this code? Is it html, javascript, or what? is it SQL statements that are embedded in the code(Sorta like how I can use SQL in C# but its just more like a simple wrapper that forwards the SQL statements to the server)?

ASP, in your case. This may be as simple as including UserID as a
column in the table, then forwarding SQL statements like:

select (list of fields)
from the_table
where UserID = 'jblow123' (and possibly other conditions)

The overall architecture looks like this:

SQL <-------------------- ASP <-------------------- end user
logged into SQL logged into web site
as "website" as "jblow123"

The "website" SQL login can read/write any row in the table. The
ASP code chooses to read/write only certain rows in response to a
request from the "jblow123" web site login.
.


Loading