Well if you would look at the mysql documentation, you would notice that
varchar pads the data with spaces:-)

You can either switch to text data type, s/\s*$//; the paces out of the
extracted data, or there might be something for DBD::Mysql as there is for
DBD::Oracle (ora_type => ORA_CHAR), but maybe just SQL_CHAR in bind_param
will do the job.

Ilya

> -----Original Message-----
> From: Jatin Nansi [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 05, 2001 1:37 AM
> To: [EMAIL PROTECTED]
> Subject: Problem with dbi - mysql varchar columns
>
>
> Hello,
>
> I am facing a peculiar problem with dbi (1.14) / mysql (3.23.22-beta).
> whenever i enter data
> to a varchar column in a mysql table using dbi, there is a lot of spaces
> suffixed to the data.
> I think it fills up the column to its total width with spaces. As a
> result the display of the data
> using the mysql client is quite terrible, with data getting blanked out.
> I have no idea what is
> happening, and this is my first attempt with dbi.
>
> Please tell me where could I be going wrong here.
>
> Thanks
>
> Jatin

Reply via email to