Really can't say. Maybe a character encoding problem if you're copy-and-pasting. The following code works here:
use strict; use warnings; use DBI; my $db = DBI->connect('DBI:mysql:host=localhost'); my ($encoded) = $db->selectrow_array("SELECT ENCODE('ToBeHidden', 'sec +retvalue')"); my ($decoded) = $db->selectrow_array("SELECT DECODE('$encoded', 'secre +tvalue')"); print $decoded; # prints --> ToBeHidden
In reply to Re^5: Perl script to decode SQL ENCODE function
by Loops
in thread Perl script to decode MySQL ENCODE() function
by Martin90
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |