List:General Discussion« Previous MessageNext Message »
From:william drescher Date:August 19 2012 10:05pm
Subject:Re: update doesn't
View as plain text  
On 8/19/2012 5:56 PM, william drescher wrote:
>>
>>   mysql> select status from tasks;
> +--------+
> | status |
> +--------+
> | W      |
> +--------+
> 1 row in set (0.00 sec)
>
> mysql> update tasks set status= 'H';
> Query OK, 1 row affected (0.00 sec)
> Rows matched: 1 Changed 1 Warnings: 0
>
> mysql> select status from tasks;
> +--------+
> | status |
> +--------+
> | W      |
> +--------+
> 1 row in set (0.00 sec)
>
> whoops
>
> bill
>
>
 >
 >
further information - interesting, it will accept X but not H
   mysql> select status from tasks;
+--------+
| status |
+--------+
| W      |
+--------+
1 row in set (0.00 sec)

mysql> update tasks set status= 'X';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed 1 Warnings: 0

mysql> select status from tasks;
+--------+
| status |
+--------+
|  X     |
+--------+
1 row in set (0.00 sec)


mysql> update tasks set status= 'H';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed 1 Warnings: 0

mysql> select status from tasks;
+--------+
| status |
+--------+
| W      |
+--------+
1 row in set (0.00 sec)

whoops


However, If I fully qualify the col name it works.

 >
 >   mysql> select status from tasks;
+--------+
| status |
+--------+
| W      |
+--------+
1 row in set (0.00 sec)

mysql> update Information_server.tasks set status= 'H';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed 1 Warnings: 0

mysql> select status from tasks;
+--------+
| status |
+--------+
| H      |
+--------+
1 row in set (0.00 sec)

I suspect there is a problem naming a col "status"

bill



bill




Thread
update doesn'twilliam drescher17 Aug
  • Re: update doesn'tRik Wasmus17 Aug
    • Re: update doesn'twilliam drescher19 Aug
      • Re: update doesn'tJohnny Withers19 Aug
        • Re: update doesn'twilliam drescher19 Aug
          • Re: update doesn'twilliam drescher19 Aug
      • Re: update doesn'tMogens Melander20 Aug
        • Re: update doesn'twilliam drescher20 Aug