Click here to get back home

DROP TABLE customers

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
DROP TABLE customers Ignoramus26246 05-09-2008
Posted by Rik Wasmus on May 9, 2008, 11:38 am
Please log in for more thread options
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]

Posted by Ignoramus26246 on May 9, 2008, 1:17 pm
Please log in for more thread options
> 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.

Yes. We have one ID which is read/write. A lot of scripts that are
information only, would benefit from saying "I do not want to change
anything", that would make them safer wrt errors.

Otherwise, I agree with your comment. Two IDs would be cleaner.
--
Due to extreme spam originating from Google Groups, and their inattention
to spammers, I and many others block all articles originating
from Google Groups. If you want your postings to be seen by
more readers you will need to find a different means of
posting on Usenet.
http://improve-usenet.org/

Posted by Rik Wasmus on May 10, 2008, 1:17 am
Please log in for more thread options
wrote:

>
>> 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.
>
> An even tighter method, if you're using a version of MySQL that supports
> stored procedures, is to use them to define an API for access to your
> data.
> Then you can give a user permission to execute your API procedures, and
> no
> low-level access at all.

Well, that's of course less tight then no alteration whatsoever, but
indeed a very usefull one to keep basic functionality and alterations
going with a limited user while keeping integrity.
--
Rik Wasmus
[SPAM] Now temporarily looking for some smaller PHP/MySQL projects/work to
fund a self developed bigger project, mail me at rik at rwasmus.nl. [/SPAM]

Posted by A. Sinan Unur on May 9, 2008, 12:55 pm
Please log in for more thread options

> --
> Due to extreme spam originating from Google Groups, and their inattention
> to spammers, I and many others block all articles originating
> from Google Groups. If you want your postings to be seen by
> more readers you will need to find a different means of
> posting on Usenet.
> http://improve-usenet.org/

Back to the killfile you go with this self congratulatory troll-bait
drivel and your morphing personality.

Sinan
--
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/

Posted by Gordon Etly on May 10, 2008, 3:37 am
Please log in for more thread options
A. Sinan Unur wrote:
>
> > --
> > Due to extreme spam originating from Google Groups, and their
> > inattention to spammers, I and many others block all articles
> > originating from Google Groups. If you want your postings to
> > be seen by more readers you will need to find a different
> > means of posting on Usenet.
> > http://improve-usenet.org/
>
> Back to the killfile you go with this self congratulatory troll-bait
> drivel and your morphing personality.

The world doesn't need to know who is going in your killfile. Please
keep your private matters to yourself.

--
G.Etly



Similar ThreadsPosted
Formatting a single line without effecting the entire table with the Text::Table module March 10, 2005, 11:18 am
Drag and drop March 3, 2005, 12:12 am
How to post back the data by selecting a value from drop down list November 20, 2006, 9:28 am
Select from drop down menu multipel times in the same form May 5, 2007, 11:34 am
Pb of key in a table September 20, 2005, 4:50 am
DBI and symbol table August 20, 2005, 3:12 pm
Help with a HTML table April 4, 2006, 8:47 am
table sorting May 3, 2006, 5:58 pm
How to get table from some html February 5, 2007, 12:48 am
how to new Table in a loop? March 21, 2007, 3:09 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap