Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

RE: ODBC question

by mr_ayo (Beadle)
on May 10, 2000 at 20:56 UTC ( #11009=note: print w/ replies, xml ) Need Help??


in reply to ODBC question

Yea, there's a way around this.

sub mySQLQuote { my ($value,$maxlen) = @_; $value =~ s/\'/\'\'/g; $value = substring($value,1,$maxlen); return $value; } val1 = mySQLQuote(1); $val2 = mySQLQuote("'"); $db->Sql("INSERT INTO Comment ( Field1, Field2 )VALUES ('$val1', '$val +2') ");


Comment on RE: ODBC question
Download Code
RE: RE: ODBC question
by mr_ayo (Beadle) on May 10, 2000 at 22:04 UTC
    Man I always do that! Stupid stupid.

    Your assignments should read:
    $val1 = mySQLQuote(1,1); $val2 = mySQLQuote('1',3);

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2015-07-06 16:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls