Eko Budiharto <[EMAIL PROTECTED]> wrote on 18/03/2005 16:54:09:

> 
> 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   + 
> +-------------+

MySQL does not support arrays of data in one field. You cannot enter 
multiple entries into a numeric field. You could, of course, enter it as a 
string, but this is regarded as very bad practice. Most users would 
inquire why you need to do this, and suggest that you should be 
reconsidering your table design if you need this sort of facility.

        Alec

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to