List:General Discussion« Previous MessageNext Message »
From:Roger Baklund Date:June 6 2003 7:06pm
Subject:Re: UPDATE doesn't work
View as plain text  
* PaT!
[...]
> I need to update some values in two fields 'prezzo' and 'totale' These
> are the values before 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)
>
> this is the UPDATE query
>
> mysql> UPDATE ordini SET prezzo = prezzo/1.024, totale = totale/1.024
> WHERE numordine>1385 AND dataord<'2003-06-01';
                 ^^^^^
This statement only updates rows with numordine>1385, your test records have
numordine=1157, which is smaller than 1385... :)

--
Roger

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