On Fri, 20 Dec 2002 07:57:50 -0500, Jeff Urlwin wrote:

> > 
> > additional to this - with MyODBC 3.51 and a newer MySQL 
> > 3.23.54 it will not work, too.
> > 
> > DBD::ODBC::st execute failed: [MySQL][ODBC 3.51 Driver] 
> > [mysqld-3.23.54-nt]You have an error in your SQL syntax near 
> > 'WHERE (TEST='test2')' at line 1 (SQL-42000)(DBD: 
> > st_execute/SQLExecute
> > err=-1)
> >  at C:\Inetpub\test\test.cgi line 39.
> > 
> > 
> > my $sth = $dbh->prepare("SELECT COUNT(TEST) FROM $dbtable 
> > WHERE (TEST=?)"); my $rv = $sth->execute($var1);  # this is line 39
> > 
> > This select will fully work for e.g. with MySQL-Front 2.5 
> > without any problems...
> > 
> 
> It's most likely the MyODBC portion of the system, rather the MySQL.  I
> haven't tested w/MySQL yet, but it's on my list of DBs to try sometime
> in the future.


The obvious sanity test is that the $dbtable var is unset for some reason.
Perhaps a check of $dbtable value prior to the prepare would suffice?

Jacqui

Jacqui Caren, Ingram Group Ltd. [EMAIL PROTECTED]
ph: +44 (0) 1483 8628xx main=00 fax=01 ddi=65
http://www.ig.co.uk/ http://www.sitedirector.org/
http://www.perl.co.uk/


Reply via email to