Gossamer Forum
Home : General : Perl Programming :

Returns the rightmost len characters from the string str?

Quote Reply
Returns the rightmost len characters from the string str?
I need to extract last digit number from NAME From Mysql table Talbe_recipient, however it seems that script return nothing. Is there anyther wrong?

--------------------------------
$sql_syntax = qq(SELECT ID, recipID, NAME, RIGHT(NAME,1) AS age FROM $table_recipient WHERE ( Sender_ID ='$sender_ID') );

&SQL_EXE($dbh,$sql_syntax);

my( $ID, $recipID, $NAME, $age);

$sth->bind_columns( undef, \$ID, \$recipID, \$age);

print<<"[HTML]";
$age
[HTML]

-----------------------------

Thanks in advance

Subject Author Views Date
Thread Returns the rightmost len characters from the string str? floramate 1752 Sep 28, 2001, 8:56 PM
Post added infos
floramate 1667 Sep 28, 2001, 11:06 PM