List:General Discussion« Previous MessageNext Message »
From:Keith C. Ivey Date:June 6 2003 5:08pm
Subject:Re: UPDATE doesn't work
View as plain text  
On 6 Jun 2003 at 19:00, PaT! wrote:

> mysql> UPDATE ordini SET prezzo = prezzo/1.024, totale = totale/1.024
> WHERE numordine>1385 AND dataord<'2003-06-01'; Query OK, 1649 rows
> affected (0.10 sec) Rows matched: 1650  Changed: 1649  Warnings: 0
> 
> These are the values after the UPDATE
> 
> mysql> SELECT prezzo, totale FROM ordini WHERE numordine=1157;
> +--------+--------+
> | prezzo | totale |
> +--------+--------+
> |  6.795 |  6.795 |
> | 13.835 | 13.835 |
> | 17.578 | 17.578 |
> | 62.500 | 62.500 |
> +--------+--------+
> 4 rows in set (0.02 sec)
> 
> Why the values didn't update?

Your update query has "WHERE numordine > 1385", but 1157 isn't 
greater than 1385.  Why would you expect the values to be updated?

-- 
Keith C. Ivey <keith@stripped>
Tobacco Documents Online
http://tobaccodocuments.org

Thread
UPDATE doesn't workPaT!6 Jun
  • Re: UPDATE doesn't workKeith C. Ivey6 Jun
  • Re: UPDATE doesn't workRoger Baklund6 Jun
  • Re: UPDATE doesn't workMikhail Entaltsev6 Jun
  • Extracting DATE from a TIMESTAMP fieldAlex Pilson6 Jun
    • Re: Extracting DATE from a TIMESTAMP fieldPaul DuBois6 Jun
      • Re: Extracting DATE from a TIMESTAMP fieldAlex Pilson6 Jun
        • Re: Extracting DATE from a TIMESTAMP fieldPaul DuBois6 Jun