Hello everyone,
Trying to run a select statement but getting errors. I know it's
something stupid but just can't put my finger on it:
$addr_slct= qq(
SELECT SUBSTRING_INDEX(IP, '.',2) AS addr, COUNT(*) AS
addrsum
FROM tbl_masterIP WHERE ipFree=? AND IP NOT LIKE ?
AND IP NOT LIKE ? GROUP BY addr;
);
$addr_count = $dbh->prepare($addr_slct);
$addr_count->execute("Yes", "$ip1.%", "$ip2.%", "$admin");
$addr_count->bind_columns(\$addr, \$count);
I can run the select statemenet from the command line and everything is
fine, but thru script it fails?
Any suggestions?
Thanks for the help..
Chad