Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

DBI Substring index query and passing value

by SriniK (Beadle)
on Dec 10, 2012 at 13:36 UTC ( #1008099=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $Agent1=$dbh->prepare('select substring_index(substring_index(substrin
    +g_index(Name,"$$$",1),"$$",1),"\$",-1) as Phone_no, substring_index(s
    +ubstring_index(Name,"$$$",1),"$$",-1) as Mail_Id from CustomFieldValu
    +es where CustomField =291 and Name like "$name%";')  || die "$DBI::er
    +rstr";
    
    ...
    
    ( $phone_no,$mail )= $Agent1->fetchrow_array;
    print "Phone:\t$phone,Mail:\t$mail\n";
    
  2. or download this
    Phone:  ,Mail:
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (11)
As of 2015-07-01 23: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 (25 votes), past polls