List:General Discussion« Previous MessageNext Message »
From:Gleb Paharenko Date:March 18 2005 5:26pm
Subject:Re: update a field with multiple value
View as plain text  
Hello.

> but what I want to do is UPDATE variableInfo SET variable='A, B'
>WHERE variable is null;
> when I use that command, mysql does not understand the syntax. 
>How to update a field with multiple value or with an array?

Multiple values could hold the SET columns, But I think that
this is not exactly what you want. See:
  http://dev.mysql.com/doc/mysql/en/set.html


Does MySQL server produce an error on your update statement? The syntax
looks correct.






Eko Budiharto <ebudihar2004@stripped> wrote:
> [-- text/plain, encoding 7bit, charset: us-ascii, 35 lines --]
> 
> 
> Hi,
> I am trying to to update one field with multiple value. 
> I tried with regulare "update" command syntax does not work. How to update a field
> with multiple value.
> 
> regular update syntax is this, UPDATE variableInfo SET variable='A' WHERE variable is
> null;
> 
> but what I want to do is UPDATE variableInfo SET variable='A, B' WHERE variable is
> null;
> 
> when I use that command, mysql does not understand the syntax. How to update a field
> with multiple value or with an array?
> 
> +-------------+
> + variable +
> +-------------+
> +             +
> +             + 
> +-------------+
> 
> but I want to update this column into 
> +-------------+
> + variable +
> +-------------+
> +             +
> +   A, B   + 
> +-------------+
> 
> 
> thank you in advance.
> 
> 
> 
>                
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Small Business - Try our new resources site! 


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   Gleb.Paharenko@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com



Thread
update a field with multiple valueEko Budiharto18 Mar
  • Re: update a field with multiple valueAlec.Cawley18 Mar
  • Re: update a field with multiple valueSGreen18 Mar
  • Re: update a field with multiple valueGleb Paharenko19 Mar