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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05Nov2006 09:26, Dylan Semler <dylan.semler@xxxxxxxxx> 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@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux