I have never run across any limitations with MySQL (and I have had some large honking queries). Can you give us some code, and errors, and what makes you think (know) it is being chopped off? Let us see through your eyes, man! :)
Very well. Here's the code that prepares the query....
my $sthQuery = $dbh->prepare('SELECT contact.forename, contact.surname
+, business.occupation, acn.position, contact.city, contact.country AS
+ forename, surname, occupation, position, city, country WHERE cont
+act.ruid=business.ruid AND contact.ruid=acn.ruid AND forename LIKE ?
+AND surname LIKE ? AND occupation LIKE ? AND position LIKE ? AND city
+ LIKE ? AND country LIKE ?')
or die "Couldn't prepare query: " . $dbh->errstr;
And here's the page (it's a CGI script) that makes me think it's being chopped off...
Couldn't execute query: You have an error in your SQL syntax near 'WHE
+RE contact.ruid=business.ruid AND contact.ruid=acn.ruid AND forename
+LIKE 'jo' at line 1 at /home/httpd/cgi-bin/basicsearch.cgi line 71.
For help, please send mail to the webmaster (dan@timmy), giving this e
+rror message and the time and date of the error.
As an aside (yes, I know the SQL is missing a FROM
clause) that particular SQL statement is not really that
long. Once you start programming a bit more, SQL
statements 10x as long as that can become the norm. I highly
recommend you start developing a better style to handle
the SQL (for aesthetic, as well as other reasons). Try
putting the SQL in a variable and then stick that
variable into the prepare, like this:
my $CONTACT_SQL = "
SELECT C.forename, C.surname, B.occupation, A.position, C.city,
C.country AS forename, surname, occupation, position, city, cou
FROM ACN A, BUSINESS B, CONTACTS C
AND forename LIKE ?
AND surname LIKE ?
AND occupation LIKE ?
AND position LIKE ?
AND city LIKE ?
AND country LIKE ?";
my $sthQuery = $dbh->prepare($CONTACT_SQL)
or die "Couldn't prepare query: $DBI::errstr";
You have no FROM in your SQL. I suggest finding one of the numerous SQL tutorials on the web (starting with the one on the MySQL website) and looking at the syntax (since this problem isn't Perl related). But, you will need to add: