phpbar.de logo

Mailinglisten-Archive

problem with TEXT fields

problem with TEXT fields

mysql-de_(at)_lists.bttr.org mysql-de_(at)_lists.bttr.org
Tue, 24 Sep 2002 08:52:16 -0700 (PDT)


hello,

this is presumably such a dull newbie question but i
did consult several manuals and couldn't find it:

When trying to import xml data into MySQL via a perl
script, i encounter the problem that the data is
written into the value fields when VARCHAR is choosen,
but not when TEXT is chosen: (MEMO) appears as field
content instead of the data.

What works:
CREATE TABLE IF NOT EXISTS $ARGV[1] (identifier
VARCHAR(255), value VARCHAR(255)) "

What doesn't work:
CREATE TABLE IF NOT EXISTS $ARGV[1] (identifier
VARCHAR(255), value TEXT) "

The table and date is then written with:
foreach my $row ($nodelist->get_nodelist ())
{
$dbh-> do (
"INSERT INTO livertox (identifier, value) VALUES
(?,?)",
undef,
$row->find ("identifier")->string_value (),
$row->find ("value")->string_value ()
);
}

So - what is wrong ??

Any help on this greatly appreciated 

Thanks a lot 
Holger 

___________________________________________________
The ALL NEW CS2000 from CompuServe
 Better!  Faster! More Powerful!
 250 FREE hours! Sign-on Now!
 http://www.compuserve.com/trycsrv/cs2000/webmail/




---
Infos zur Mailingliste, zur Teilnahme und zum An- und Abmelden unter
-->>  http://www.4t2.com/mysql 



php::bar PHP Wiki   -   Listenarchive