Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: error calling MySQL from Perl

by pfaut (Priest)
on Mar 16, 2003 at 18:38 UTC ( #243503=note: print w/replies, xml ) Need Help??

in reply to error calling MySQL from Perl

I think the qq// needs to be replaced with parenthesis. That's inside the quoted string so perl isn't going to do anything special with it. What's trying to happen there is a subselect which your version of MySQL may not support unless it is very recent. The subselect should be in parethesis. Try the following.

$rows = $dbh->do("UPDATE checkin SET destination = (SELECT destination FROM checkin WHERE firstname='Henry' AND lastname='Rollins') WHERE firstname='Bill' AND lastname='Gates' ") || die "Couldn't insert record : $DBI::errstr";
--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';

Replies are listed 'Best First'.
Re: Re: error calling MySQL from Perl
by mooseboy (Pilgrim) on Mar 16, 2003 at 19:18 UTC

    Thanks, I've tried replacing the qq/ with parens , but I still get exactly the same error -- maybe because my version of MySQL doesn't support subselect? Running mysqladmin version gives this:

    mysqladmin Ver 8.23 Distrib 3.23.48, for suse-linux on i686 Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB This software comes with ABSOLUTELY NO WARRANTY. This is free software +, and you are welcome to modify and redistribute it under the GPL licens +e Server version 3.23.48-Max-log Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/lib/mysql/mysql.sock Uptime: 21 hours 24 min 28 sec

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2021-04-14 16:24 GMT
Find Nodes?
    Voting Booth?

    No recent polls found