perlquestion
SriniK
Hi,<br/><br/>
i using the following query, here im using "substring_index, and some special variables like ( )$..." and passing value to the query "$name"
<code>
$Agent1=$dbh->prepare('select substring_index(substring_index(substring_index(Name,"$$$",1),"$$",1),"\$",-1) as Phone_no, substring_index(substring_index(Name,"$$$",1),"$$",-1) as Mail_Id from CustomFieldValues where CustomField =291 and Name like "$name%";') || die "$DBI::errstr";
$Agent1->execute() || die "$DBI::errstr" ;
( $phone_no,$mail )= $Agent1->fetchrow_array;
print "Phone:\t$phone,Mail:\t$mail\n";
</code>
but im not getting the required output. its giving just empty. <br/>
output
<code>
Phone: ,Mail:
</code>
i have changed it like placeholder.... but its not working.<br/>
please help me on this<br/>
Thanks<br/>
Srinivasan