Re: Updating Integer value in DB

This WebDNA talk-list message is from

2007


It keeps the original formatting.
numero = 68681
interpreted = N
texte = The [math] context is very picky.  It will not work correctly if the variable name includes a minus (-) or a period (.)

Example of variables that will produce failures when you try to use them inside [math][/math] are:
[math][on-hand]+1[/math]
[math][on.hand]+1[/math]
In my experience these would both produce errors.  I will assume that a space will cause the same error.  The underscore (_) character has no usage in any language, mathematical context or any other real world usage, and therefore it is a safe character to use in all variable and database field names.

Matt
-- Matthew A PerosiPsi Prime, Inc.http://www.psiprime.com323 Union Blvd.Totowa, NJ 07512P: 973.225.9870F: 973.413.8217

Ki Song wrote:
From: Matthew A Perosi <matt@psiprime.com>Reply-To: "WebDNA Talk" <WebDNA-Talk@talk.smithmicro.com>Date: Wed, 14 Mar 2007 12:34:10 -0400To: "WebDNA Talk" <WebDNA-Talk@talk.smithmicro.com>Subject: Re: Updating Integer value in DBI used to run into a lot of problems with database fields with spaces inthem.  i.e. "ON HAND" instead of the more reliable "ON_HAND".  I'vegotten them to work, but not without [url]ing everything.That said, I see 2 errors in your code so try this:You have a typo of "wqSKUdatarq" instead of "eqSKUdatarq"And the variable ON_HAND needs to be stated as a variable in [] insidethe [math] context.[replace db=^inventory.db&eqSKUdatarq=[SKU]]ON_HAND=[MATH][ON_HAND]+[updatevalue][/MATH][/replace]    
The wq was a typo on the email, not the actual code.I did that, but it does not update.Do you think the ON HAND, as opposed to an ON_HAND, may be the problem?-------------------------------------------------------------This message is sent to you because you are subscribed to  the mailing list <WebDNA-Talk@talk.smithmicro.com>.To unsubscribe, E-mail to: <WebDNA-Talk-off@talk.smithmicro.com>To switch to the DIGEST mode, E-mail to <WebDNA-Talk-digest@talk.smithmicro.com>Web Archive of this list is at: http://webdna.smithmicro.com/  



-------------------------------------------------------------This message is sent to you because you are subscribed to  the mailing list <WebDNA-Talk@talk.smithmicro.com>.To unsubscribe, E-mail to: <WebDNA-Talk-off@talk.smithmicro.com>To switch to the DIGEST mode, E-mail to <WebDNA-Talk-digest@talk.smithmicro.com>Web Archive of this list is at: http://webdna.smithmicro.com/





Associated Messages, from the most recent to the oldest:

    
  1. Re: Updating Integer value in DB ( Stuart Tremain 2007)
  2. Re: Updating Integer value in DB ( Matthew A Perosi 2007)
  3. Re: Updating Integer value in DB ( Donovan Brooke 2007)
  4. Re: Updating Integer value in DB ( "Dan Strong" 2007)
  5. Re: Updating Integer value in DB ( Matthew A Perosi 2007)
  6. Re: Updating Integer value in DB ( Ki Song 2007)
  7. Re: Updating Integer value in DB ( Jim Ziegler 2007)
  8. Re: Updating Integer value in DB ( Matthew A Perosi 2007)
  9. Updating Integer value in DB ( Ki Song 2007)
The [math] context is very picky.  It will not work correctly if the variable name includes a minus (-) or a period (.)

Example of variables that will produce failures when you try to use them inside [math][/math] are:
[math][on-hand]+1[/math]
[math][on.hand]+1[/math]
In my experience these would both produce errors.  I will assume that a space will cause the same error.  The underscore (_) character has no usage in any language, mathematical context or any other real world usage, and therefore it is a safe character to use in all variable and database field names.

Matt
-- Matthew A PerosiPsi Prime, Inc.http://www.psiprime.com323 Union Blvd.Totowa, NJ 07512P: 973.225.9870F: 973.413.8217

Ki Song wrote:
From: Matthew A Perosi <matt@psiprime.com>Reply-To: "WebDNA Talk" <WebDNA-Talk@talk.smithmicro.com>Date: Wed, 14 Mar 2007 12:34:10 -0400To: "WebDNA Talk" <WebDNA-Talk@talk.smithmicro.com>Subject: Re: Updating Integer value in DBI used to run into a lot of problems with database fields with spaces inthem.  i.e. "ON HAND" instead of the more reliable "ON_HAND".  I'vegotten them to work, but not without [url]ing everything.That said, I see 2 errors in your code so try this:You have a typo of "wqSKUdatarq" instead of "eqSKUdatarq"And the variable ON_HAND needs to be stated as a variable in [] insidethe [math] context.[replace db=^inventory.db&eqSKUdatarq=[SKU]]ON_HAND=[math][ON_HAND]+[updatevalue][/MATH][/replace]    
The wq was a typo on the email, not the actual code.I did that, but it does not update.Do you think the ON HAND, as opposed to an ON_HAND, may be the problem?-------------------------------------------------------------This message is sent to you because you are subscribed to  the mailing list <WebDNA-Talk@talk.smithmicro.com>.To unsubscribe, E-mail to: <WebDNA-Talk-off@talk.smithmicro.com>To switch to the DIGEST mode, E-mail to <WebDNA-Talk-digest@talk.smithmicro.com>Web Archive of this list is at: http://webdna.smithmicro.com/  



-------------------------------------------------------------This message is sent to you because you are subscribed to  the mailing list <WebDNA-Talk@talk.smithmicro.com>.To unsubscribe, E-mail to: <WebDNA-Talk-off@talk.smithmicro.com>To switch to the DIGEST mode, E-mail to <WebDNA-Talk-digest@talk.smithmicro.com>Web Archive of this list is at: http://webdna.smithmicro.com/



 Matthew A Perosi 

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Searchable WebCat (etc.) Docs ? (1997) WebCat2 - [format thousands] (1997) New Web Site Developers Database (1996) [shippingtotal] still... (2002) PIXO support (1997) Sort Order on a page search (1997) controlling user input (1998) Searchable WebCat (etc.) Docs ? (1997) problems with 2 tags shakur (1997) WebCat2 several catalogs? (1997) WebCat2 several catalogs? (1997) decrypt - encrypt (1999) unable to launch acgi in WebCat (1997) WC2f3 (1997) Associative lookup style? + bit more (1997) format_to_days on NT (1997) customers order (1999) Searching a field and returning the highest value (1997) Ok here is a question? (1997) Searching Multiple DBs (1997)