You need a where clause at the end to tell it which row to update.

[EMAIL PROTECTED] wrote:

>. mysqladmin version
>mysqladmin  Ver 8.21 Distrib 3.23.42, for apple-darwin1.4 on powerpc
>Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
>This software comes with ABSOLUTELY NO WARRANTY. This is free software,
>and you are welcome to modify and redistribute it under the GPL license
>
>Server version          3.23.42-log
>Protocol version        10
>Connection              Localhost via UNIX socket
>UNIX socket             /tmp/mysql.sock
>Uptime:                 1 day 7 hours 15 min 46 sec
>
>Threads: 1  Questions: 436  Slow queries: 0  Opens: 93  Flush tables: 2
>Open tables: 0 Queries per second avg: 0.004
>
>. Vendor Apple Blue&White G3
>. MacOS X 10.1.3
>. The included compiler in MacOSX Developer Tools gcc?
>
>
>THE ERROR
>See what happens in the start column, it change ?????? when updating
>price column
>
>mysql> SELECT * FROM bookings;
>+----+----------------+----------------+----------------+----------------+
>--------+-------+------------+
>| id | start          | stop           | registrated    |
>booking_object | booker | price | part_payed |
>+----+----------------+----------------+----------------+----------------+
>--------+-------+------------+
>|  1 | 20020324184014 | 20020321045959 | 20020323022729 |
>1 |      1 | NULL  | NULL       |
>|  2 | 20020324184014 | 20020330055959 | 20020324171150 |
>1 |      1 | NULL  | NULL       |
>+----+----------------+----------------+----------------+----------------+
>--------+-------+------------+
>2 rows in set (0.00 sec)
>
>mysql> UPDATE bookings SET price='0';
>Query OK, 2 rows affected (0.01 sec)
>Rows matched: 2  Changed: 2  Warnings: 0
>
>mysql> SELECT * FROM bookings;
>+----+----------------+----------------+----------------+----------------+
>--------+-------+------------+
>| id | start          | stop           | registrated    |
>booking_object | booker | price | part_payed |
>+----+----------------+----------------+----------------+----------------+
>--------+-------+------------+
>|  1 | 20020324184136 | 20020321045959 | 20020323022729 |
>1 |      1 | 0     | NULL       |
>|  2 | 20020324184136 | 20020330055959 | 20020324171150 |
>1 |      1 | 0     | NULL       |
>+----+----------------+----------------+----------------+----------------+
>--------+-------+------------+
>2 rows in set (0.00 sec)
>
>mysql> desc bookings;
>+----------------+---------------+------+-----+---------+----------------+
>| Field          | Type          | Null | Key | Default |
>Extra          |
>+----------------+---------------+------+-----+---------+----------------+
>| id             | int(11)       |      | PRI | NULL    |
>auto_increment |
>| start          | timestamp(14) | YES  |     |
>NULL    |                |
>| stop           | timestamp(14) | YES  |     |
>NULL    |                |
>| registrated    | timestamp(14) | YES  |     |
>NULL    |                |
>| booking_object | int(11)       | YES  | MUL |
>NULL    |                |
>| booker         | int(11)       | YES  |     |
>NULL    |                |
>| price          | text          | YES  |     |
>NULL    |                |
>| part_payed     | text          | YES  |     |
>NULL    |                |
>+----------------+---------------+------+-----+---------+----------------+
>8 rows in set (0.00 sec)
>
>Best Greetings
>
>Sive
>
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail <[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to