# > $value2 = $dbh->prepare("SELECT page FROM $Table
# >
# > GROUP BY page") || die "Couldn't add record, ".$dbh->errstr();
# >
# > "SQL ERROR: Can't find table names in FROM clause!"
# You should use $value2 = $dbh->prepare('SELECT page FROM '."$Table".'
# GROUP BY page' etc. or use quote function of dbi module
The quotes are unnecessary. It seems to me that the problem lies in the
possibility that $Table is probably undefined or an empty string. Check
that first. If you still have a problem, make sure you're using the latest
release of DBI/MySQL. The following is valid perl ONLY if $Table is defined
AND non-empty:
$value2 = $dbh->prepare("SELECT page FROM $Table GROUP BY page");
Use strict to avoid this sort of error. If you're using strict, then perform
a check on $Table before the query.
--
Jonathan Daugherty
http://www.cprogrammer.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]