For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > September 2005 > RE: [PHP-DB] adding to the current value









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 RE: [PHP-DB] adding to the current value
Hutchins, Richard

2005-09-29, 6:56 pm

You do it by:

UPDATE my_table set field_1 = field_1 - 1 [...add any where statements here]

Bastien pretty much answered your question because the example you provided
was, in theory, correct. Besides, unless you're messing with a production
system, you could always just try out simple stuff like this on your own and
see what happens. More fun that way anyhow.

Rich

-----Original Message-----
From: Justin Turner [mailto:trnr@reslife.rochester.edu]
Sent: Thursday, September 29, 2005 5:04 PM
To: Bastien Koert
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] adding to the current value


How can I do this?

Bastien Koert wrote:

> yes
>
>
>
>


--

========================================
======
A. Justin Turner
ResNet Coordinator
University of Rochester
020 Gates Wing Susan B. Anthony Hall
jt@reslife.rochester.edu

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Justin Turner

2005-09-29, 6:56 pm

....now don't I feel foolish. Thanks for your help.

Hutchins, Richard wrote:

>You do it by:
>
>UPDATE my_table set field_1 = field_1 - 1 [...add any where statements here]
>
>Bastien pretty much answered your question because the example you provided
>was, in theory, correct. Besides, unless you're messing with a production
>system, you could always just try out simple stuff like this on your own and
>see what happens. More fun that way anyhow.
>
>Rich
>
>-----Original Message-----
>From: Justin Turner [mailto:trnr@reslife.rochester.edu]
>Sent: Thursday, September 29, 2005 5:04 PM
>To: Bastien Koert
>Cc: php-db@lists.php.net
>Subject: Re: [PHP-DB] adding to the current value
>
>
>How can I do this?
>
>Bastien Koert wrote:
>
>
>
>
>
>


--

========================================
======
A. Justin Turner
ResNet Coordinator
University of Rochester
020 Gates Wing Susan B. Anthony Hall
jt@reslife.rochester.edu
Sponsored Links







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

Copyright 2008 codecomments.com