/ Forside / Teknologi / Udvikling / PHP / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
PHP
#NavnPoint
rfh 3959
natmaden 3372
poul_from 3310
funbreak 2700
stone47 2230
Jin2k 1960
Angband 1743
Bjerner 1249
refi 1185
10  Interkril.. 1146
Possible to "lock" one row in a table so t~
Fra : Christian Borchgrevi~


Dato : 16-04-02 14:47

How do I do this, if possible?

Thanks

Christian




 
 
-Martin- (16-04-2002)
Kommentar
Fra : -Martin-


Dato : 16-04-02 18:37

On Tue, 16 Apr 2002 15:46:31 +0200, "Christian Borchgrevink-Lund"
<borchgrevink@yahoo.com> wrote:

>How do I do this, if possible?
>
>Thanks
>
>Christian
>
>

SELECT id FROM table WHERE id != '1' ?

or

UPDATE table SET name='$name' WHERE id != '1'

If it's not what you mean, the please explain more things from your
problem

Christian Borchgrevi~ (16-04-2002)
Kommentar
Fra : Christian Borchgrevi~


Dato : 16-04-02 18:56

Thanks, but this is not exactly what I meant.

I am running a site with an admin section. In this adminsection I can make
give admin privilegies to other users. We can all see who are
administrators, and delete those who we want. But I do not want it to be
possible to delete me (who is adminID=1).

Thanks

Christian

"-Martin-" <admin@natten-i.dk> wrote in message
news:36oobuk309kphnhpfju4m6bdoam65r26ie@4ax.com...
> On Tue, 16 Apr 2002 15:46:31 +0200, "Christian Borchgrevink-Lund"
> <borchgrevink@yahoo.com> wrote:
>
> >How do I do this, if possible?
> >
> >Thanks
> >
> >Christian
> >
> >
>
> SELECT id FROM table WHERE id != '1' ?
>
> or
>
> UPDATE table SET name='$name' WHERE id != '1'
>
> If it's not what you mean, the please explain more things from your
> problem



Thomas Lindgaard (17-04-2002)
Kommentar
Fra : Thomas Lindgaard


Dato : 17-04-02 14:02

Hello

> I am running a site with an admin section. In this adminsection I can make
> give admin privilegies to other users. We can all see who are
> administrators, and delete those who we want. But I do not want it to be
> possible to delete me (who is adminID=1).

Just write a little code...

if ( $adminID != 1 )
{
// Delete the stuff
}
else
{
echo "Oups! You DONT want to delete the big guy!";
}

/Thomas



Christian Borchgrevi~ (17-04-2002)
Kommentar
Fra : Christian Borchgrevi~


Dato : 17-04-02 14:11

Thanks alot!!!


"Thomas Lindgaard" <thomas@it-snedkeren.dk> wrote in message
news:3cbd72df$0$97278$edfadb0f@dspool01.news.tele.dk...
> Hello
>
> > I am running a site with an admin section. In this adminsection I can
make
> > give admin privilegies to other users. We can all see who are
> > administrators, and delete those who we want. But I do not want it to be
> > possible to delete me (who is adminID=1).
>
> Just write a little code...
>
> if ( $adminID != 1 )
> {
> // Delete the stuff
> }
> else
> {
> echo "Oups! You DONT want to delete the big guy!";
> }
>
> /Thomas
>
>



Søg
Reklame
Statistik
Spørgsmål : 177552
Tips : 31968
Nyheder : 719565
Indlæg : 6408849
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste