Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] Which is less expensive computationally?



******    message to minivend-users from Ramsey French <rammjet@mac.com>     ******

Next update in 22 minutes.... ;-)

> From: Chris Rapier <rapier@psc.edu>
> 
> ******    message to minivend-users from Chris Rapier <rapier@psc.edu>
> ******
> 
> I have a flag set in a database so new customers can get a discount.
> After they have made their firt order I need to set this to zero.
> 
> Which would be less expensive;
> Doing a lookup in the database, then an if, and then setting it to zero
> if it is not already zero?
> 
> -or-
> 
> Automatically setting it to zero regardless of its previous value?
> 
> I've a feeling its less taxing to just set it to zero each time unless
> database writes are a lot more intensive than both a read and a
> conditional.
> -
> To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: