OT: Insert brackets ( [ , ] ) into mysql table

Cameron Simpson cs at zip.com.au
Sun Nov 5 22:56:51 UTC 2006


On 05Nov2006 09:26, Dylan Semler <dylan.semler at gmail.com> wrote:
| > |  insert into objects (object, ID, `Spec.`) VALUES ('[mag]', '[mag]', '
| > | with backslashes and backticks around the brackets.  Usually mysql juts
| > | updates the table with a [, rather than [mag].  Anyone know how this
| should | > | be done?
| >
| > Please show us "describe objects". Maybe your column types are
| > restrictive?
| 
| mysql> describe objects;
| +---------------+---------+------+-----+---------+-------+
| | Field         | Type    | Null | Key | Default | Extra |
| +---------------+---------+------+-----+---------+-------+
| | object        | char(1) | YES  |     | NULL    |       |
| | ID            | char(1) | YES  |     | NULL    |       |
[...]

You can't fit a 5 character string into a 1 character column!
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/




More information about the users mailing list