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.
Thanks
--
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/
I would reply, but according to your sig, you won't see it!
> 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.
>
> Thanks
MySQL user security[1] will handle this.
[1] Given the normal implementation of MySQL in hosting environments,
this might be what you want to hear.[2]
[2] If so, try another way :-)
--
p BotM#1 LotR#9
http://www.last.fm/user/prawnuk
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]
> I think you meant:
> [1] Given the normal implementation of MySQL in hosting environments,
> this might NOT be what you want to hear.[2]
>
> [2] If so, try another way :-)
Doh! Friday afternoon syndrome strikes.
> --
> 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
--
A. Sinan Unur <1u...@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
Oh, are we at number 26246 already? All the other 26245 have been
killfiled by everyone, I guess. That's why you need to come up with a
new identity every few days. Won't help you....
jue
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.
Only stupid people cannot figure out how to killfile by regular expression.
> 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.
Define a user that has the permissions you want, and log in with DBI using
that user.
sherm--
--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
> 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.
mysql> GRANT SELECT ON database.* TO 'webuser'@'localhost' IDENDIFIED
BY 'webuserpassword';
Then, use webuser as your user for your application.
CC
> Rik Wasmus <luiheid...@hotmail.com> writes:
>
>> 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]
The world doesn't need to know who is going in your killfile. Please
keep your private matters to yourself.
--
G.Etly
GE> A. Sinan Unur wrote:
>> Ignoramus26246 <ignoram...@NOSPAM.26246.invalid> wrote
>> in news:ZOGdnYzvPOYa9LnV...@giganews.com:
>>
>> > --
>> > 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.
GE> The world doesn't need to know who is going in your killfile. Please
GE> keep your private matters to yourself.
will you ever make a comment about perl code itself? you are the most
meta flamer i have seen in a while. even moronzilla talked about perl
itself more often than you.
uri
--
Uri Guttman ------ u...@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
{Please don't lead your quote char with white space.}
> > A. Sinan Unur wrote:
> > > Ignoramus26246 <ignoram...@NOSPAM.26246.invalid> wrote
> > > in news:ZOGdnYzvPOYa9LnV...@giganews.com:
> > > 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.
> will you ever make a comment about perl code itself?
It's not a requirement to comment. It's certainally no concern of yours,
as you are not mine nor anyone else's keeper.
> you are the most meta flamer i have seen in a while. even
> moronzilla talked about perl itself more often than you.
Why is everything you don't like a "flame" to you? It was a basic
comment, that one doesn't need to shout out to the world, "hey I'm going
to ignore this guy!!!!!!". It's like standing in a busy terminal and
yelling around that you're ignoring someone. It's little more than a
poor attempt to get attention. Not unlike what you do when you see posts
you don't like.
--
G.Etly
>Why is everything you don't like a "flame" to you? It was a basic
>comment, that one doesn't need to shout out to the world, "hey I'm going
>to ignore this guy!!!!!!". It's like standing in a busy terminal and
>yelling around that you're ignoring someone.
***PLONK***
jue
GE> Uri Guttman wrote:
>> will you ever make a comment about perl code itself?
GE> It's not a requirement to comment. It's certainally no concern of yours,
GE> as you are not mine nor anyone else's keeper.
it is a concern of this group. all you ever comment about is how others
post things. this means you are not contributing anything useful. those
who post about perl will also comment about other stuff. since you don't
mention any perl code ever, you have no right to post about others. the
rule as has been told to you is those who help with perl can make other
comments.
>> you are the most meta flamer i have seen in a while. even
>> moronzilla talked about perl itself more often than you.
GE> Why is everything you don't like a "flame" to you? It was a basic
GE> comment, that one doesn't need to shout out to the world, "hey I'm
GE> going to ignore this guy!!!!!!". It's like standing in a busy
GE> terminal and yelling around that you're ignoring someone. It's
GE> little more than a poor attempt to get attention. Not unlike what
GE> you do when you see posts you don't like.
you are a flamer since all you say are negative comments about other
posters. show me one perl comment of yours in the last month. or a
positive comment about anything.
and you can plonk me if you wish. i will still defend others who tell
posters how to read the guidelines, the FAQ and such. that is how to
teach better perl.
[please don't lead quoted text with spaces.]
> Gordon Etly <g...@bentsys.com> writes:
> > Uri Guttman wrote:
> > > will you ever make a comment about perl code itself?
> > It's not a requirement to comment. It's certainally no concern of
> > yours, as you are not mine nor anyone else's keeper.
> all you ever comment about is how others post things.
It's not the only thing I comment about, but it is perfecly valid in any
group. always has been. If you can't take feedback, don't post.
> this means you are not contributing anything useful.
I could argue the same thing about posts announcing a killfile hit.
> since you don't mention any perl code ever, you have no right
> to post about others.
1) This has NEVER been a requirement to post, and 2) you are assuming
you know my entire posting history, which you most certainly don't. I
spend a good deal of time helping on various lists out there and I have
been using Perl a long time and have followed this and many groups for
over a decade. You stance, attempting to impose an artificial
requirement, is complete rubbish.
> you are a flamer since all you say are negative comments about other
> posters.
Even more backwards rubbish. I merely point out what I don't like. It's
called making a comment about something. It is not automatically a
flame, unless of course it's something the receiving end (and related
parties) obviously don't like to hear, then that person has to be
silenced. Sadly it's a reoccurring thing on UseNet.
--
G.Etly
> Why is everything you don't like a "flame" to you?
It's not "everything Uri doesn't like."
It's the fact that you've been doing nothing about pissing and moaning
and flaming about every topic that comes up, ever since you lost your silly
little "PERL vs. Perl" spat. Give it a rest already! Grow up or get out.
> "Gordon Etly" <g...@bentsys.com> writes:
> > Why is everything you don't like a "flame" to you?
> It's not "everything Uri doesn't like."
It sure seems like it.
> It's the fact that you've been doing nothing about pissing and moaning
> and flaming about every topic that comes up, ever since you lost your
> silly little "PERL vs. Perl" spat. Give it a rest already! Grow up or
> get out.
1) How does commenting in a few topics every so often become "every"
topic?
2) I merely comment on what I see, and how I felt it was either wrong or
unnecessary. It's not a flame. But I can see how one who can't accept
being wrong or that their are other points of view and ways of looking
at things might see every contrary comment as a flame...
--
G.Etly
> I can see how one who can't accept being wrong
That would be you.
I'm done here - you've got nothing positive to contribute here, so into
the killfile you go. Bye.
> > I can see how one who can't accept being wrong
> That would be you.
You have yet to prove it. The comments I made on certain people's
postings were precisely because they were in the wrong, and clearly none
of them, including yourself, seems capable of admitting even the
possibility of a fault. Rather than saying something along the lines of
"oh, perhaps it wasn't so right to say that", usually someone like Uri
or yourself jumps in to defend the person I was replying to, as if being
a body guard.
What exactly frightens some of you to just simply say "perhaps
<he/she/I/etc> may have been wrong on <some note>..." ? Why pretend like
commenting on a someone's posting is taboo, when either a) you know the
person being commented upon and feel you mujst protect thme at all
costs, and b) when the commentator is someone you do not like, and thus
the commentee must be protected from them in all costs?
All this leads to, instead of a civil and potentially much shorter
disucssions, instead people like Uri and yourself (sorry if I keep using
him and you, you two have stood out) are the oens who keep turning them
into mini-flame wars, all in the name of tarnishing someone for making a
comment on what another person has posted which you don't agree with.
--
G. Etly