For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > November 2005 > dumb mysql question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author dumb mysql question
sittingduck

2005-11-02, 3:57 am

Using phpMyAdmin, I want to find every user in my nuke_users table that has
user_timezone -7 (figured this part out) and CHANGE the value to -8. (can't
find a way to do this part)

How can I do this? there are about 60 users that still have -7, and editing
them one at a time would be a PITA.
Rik

2005-11-02, 7:56 am

sittingduck wrote:
> Using phpMyAdmin, I want to find every user in my nuke_users table
> that has user_timezone -7 (figured this part out) and CHANGE the
> value to -8. (can't find a way to do this part)
>
> How can I do this? there are about 60 users that still have -7, and
> editing them one at a time would be a PITA.


run SQL:

UPDATE nuke_users SET user_timezone=-8 WHERE user_timezone=-7

Grtz,

Rik


Joe Makowiec

2005-11-02, 7:56 am

On 02 Nov 2005 in alt.php.sql, sittingduck wrote:

> Using phpMyAdmin, I want to find every user in my nuke_users table
> that has user_timezone -7 (figured this part out) and CHANGE the
> value to -8. (can't find a way to do this part)
>
> How can I do this? there are about 60 users that still have -7, and
> editing them one at a time would be a PITA.


http://dev.mysql.com/doc/refman/4.1/en/update.html

--
Joe Makowiec
http://makowiec.org/
Email: http://makowiec.org/contact/?Joe
Ciaran Mcnulty

2005-11-02, 7:56 am

UPDATE nuke_users SET user_timezone = -8 WHERE user_timezone = -7

Back it up first though, in case you have a typo.

JMB

2005-11-02, 7:56 am

try this:

update nuke_users set user_timezone = '-8' where user_timezone = '-7';


That should do it for ya

"sittingduck" <spam.no.sitting-duck@spamgourmet.com> wrote in message
news:Xns9702D05AB021duckrulestheuniverse
@news.easynews.com...
> Using phpMyAdmin, I want to find every user in my nuke_users table that
> has
> user_timezone -7 (figured this part out) and CHANGE the value to -8.
> (can't
> find a way to do this part)
>
> How can I do this? there are about 60 users that still have -7, and
> editing
> them one at a time would be a PITA.



Oli Filth

2005-11-02, 6:56 pm

sittingduck wrote:
> Using phpMyAdmin, I want to find every user in my nuke_users table that has
> user_timezone -7 (figured this part out) and CHANGE the value to -8. (can't
> find a way to do this part)
>


UPDATE table SET value = x WHERE value = y


--
Oli

DXTrim

2005-11-02, 6:56 pm

Execute SQL query:

UPDATE nuke_users SET user_timezone = "-8" WHERE user_timezone = "-7"

Cheers,

Trevis

"sittingduck" <spam.no.sitting-duck@spamgourmet.com> wrote in message
news:Xns9702D05AB021duckrulestheuniverse
@news.easynews.com...
> Using phpMyAdmin, I want to find every user in my nuke_users table that

has
> user_timezone -7 (figured this part out) and CHANGE the value to -8.

(can't
> find a way to do this part)
>
> How can I do this? there are about 60 users that still have -7, and

editing
> them one at a time would be a PITA.



lkrubner@geocities.com

2005-11-02, 6:56 pm


sittingduck wrote:
> Using phpMyAdmin, I want to find every user in my nuke_users table that has
> user_timezone -7 (figured this part out) and CHANGE the value to -8. (can't
> find a way to do this part)
>
> How can I do this? there are about 60 users that still have -7, and editing
> them one at a time would be a PITA.


Something like

update nuke_users set user_timezone = user_timezone - 1;

sittingduck

2005-11-02, 6:56 pm

Ciaran Mcnulty wrote:

> UPDATE nuke_users SET user_timezone = -8 WHERE user_timezone = -7
>
> Back it up first though, in case you have a typo.
>


Very nice! Thanks for all the replies. :)
sam

2005-11-10, 6:57 pm

1- Click on the SQL tab
2- Write: UPDATE nuke_users SET user_timezone = -8 WHERE user_timezone = -7
3- Click on execute button

Regards.

"sittingduck" <spam.no.sitting-duck@spamgourmet.com> a écrit dans le message
de news: Xns9702D05AB021duckrulestheuniverse@news
.easynews.com...
> Using phpMyAdmin, I want to find every user in my nuke_users table that
> has
> user_timezone -7 (figured this part out) and CHANGE the value to -8.
> (can't
> find a way to do this part)
>
> How can I do this? there are about 60 users that still have -7, and
> editing
> them one at a time would be a PITA.



sittingduck

2005-11-18, 6:59 pm

sam wrote:

> 1- Click on the SQL tab
> 2- Write: UPDATE nuke_users SET user_timezone = -8 WHERE user_timezone = -7
> 3- Click on execute button


That's pretty much what I ended up doing :) Thanks.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com