I'm trying to write a script that pulls in reply attributes from a MSSQL
(Platypus) database and inserts them into an existing SUBSCRIBERS table
on a MySQL database. I've got everything working fine down to one part..
The UPDATE statement fails to put the correct data in, and instead cuts
short at the '=' every time. I'm using perl with dbi and the mysql-msql
dbd modules. I can update the table for other values with no problem.
Only data with an '=' in it fails and I've tried everything I can think
of to get the data in there.
Current code is as follows:
$update = $dbh2->prepare("UPDATE SUBSCRIBERS SET
REPLYATTR='$new_attrib',TimeStamp='$cus_timestamp' WHERE (AccountID like
'$sub_plat_id')");
die "Prepare failed for Update 2 : $update\n" unless defined
$update;
if (not $update->execute) {
die "Execute failed -- $DBI::errstr\n";
}
Where new_attrib is a attribute pair such as
'Framed-Address=xxx.xxx.xxx.xxx' at the least, sometimes multiple pairs
comma seperated. The correct values do print to console fine, so I know
new_attrib has the correct data in it and is not malformed. If I place
any other data without an '=' it updates correctly into the REPLYATTR
field as well.
Any assistance would be appreciated.
--
------------------------------------------------------------
Stephen Comoletti - Network Engineer / Systems Administrator
Delanet Inc. http://www.delanet.com
Frontline Communications Corp. http://www.fcc.net
phone: (302) 326-5800 fax: (302) 326-5802 x312
262 Quigley Blvd, New Castle, DE 19720, USA
------------------------------------------------------------
===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.