View Single Post

  #5 (permalink)  
Old 05-09-2008
Rik Wasmus
 
Posts: n/a
Default Re: DROP TABLE customers

Ignoramus26246 wrote:
> I would like to know if Perl's DBI supports an attribute that would
> make a database handle read only.
>
> That is, I am looking for a way to make a handle read only so that all
> subsequent queries that seek to modify the database, would not proceed
> at all.
>
> This would be for mysql.


A better way would be to make a user with only select priviliges, and no
insert/update/drop privilige. Trying to get this in Perl's DBI seems
needlessly complicated, and in any way less reliable then on database level.

Of course, there's no objection to having two connection to a database:
one which can alter, and one which can't.
--
Rik Wasmus
[SPAM]
Now looking for some smaller projects to work on to fund a bigger one
with delayed pay. If interested, mail rik at rwasmus.nl
[/SPAM]
Reply With Quote