Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: unpacking - html re-encoding?

by iakobski (Pilgrim)
on Jul 18, 2001 at 11:15 UTC ( [id://97567]=note: print w/replies, xml ) Need Help??


in reply to unpacking - html re-encoding?

Can you confirm how you are the DBI module to do the insert into the database?

If you are there are two ways in which these sorts of things are handled. If you are binding parameters to statements, using bind_param() then the quoting is handled automatically. If you are using a variable in the SQL statement, then there is the handy quote() function:

use strict; use DBI; # set up variables stuff omitted my $dbh = DBI->connect( $connection_string, $user, $pass ); my $value_q = $dbh->quote( $value ); my $sth = $dbh->prepare( "INSERT INTO my_table VALUES ( $value_q ) " ); ## etc...

If you're not using DBI or DBIx, then you should check them out.

-- iakobski

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://97567]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2024-03-28 09:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found