Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Mysql module

by pfaut (Priest)
on Mar 07, 2003 at 01:00 UTC ( [id://241049]=note: print w/replies, xml ) Need Help??


in reply to Mysql module

I believe LEFT() ought to take two parameters; one being a string to extract characters from and two being the number of characters to extract. Maybe you should try something like

my $l = length($var); my $query = "SELECT field1,field2 FROM my_table WHERE LEFT(field3,$l) += '$var'";
--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-25 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found