Re: Re: DBD::mysql::st execute failed: You have an error in your SQL syntax near ')

Gerard Lanois <[email protected]> Wed, 16 Apr 2003 21:50:38 -0700 (PDT)
Newsgroups gmane.network.ubh
Message-ID <[email protected]>
This makes me think that no server connections have
been opened.

Did you set up the server table?  In other words, did you
customize the contents of the 2_servers.sql file prior to
running the installer script?

Here is an SQL procedure you can use to determine if there
are any servers in your server table:

USE ubhcache;
SELECT * FROM servers;


That should show you all the servers you are going to
connect to during a run.

If that table is non-empty, then it is possible that
ubh was not able to connect to any of them at the beginning
of the run.  Were there any error or warning messages about
this earlier in the run?

Now that I look at the code, I see the connection logic 
bails out with exit(-1) if a server connection cannot be
established.  So, you would never get as far as you did
if a server connection could not be made.

The thing to look for is a message in the log that
says "Sucessfully connected".  You should see that for
each server in your server table.

The more I think about it the more likely it is your
server table has nothing in it.  

If it does, let me know.



Hope this helps.

-Gerard


--- tony_bierman <[email protected]> wrote:
> Here's the output:
> 
> SQL> SELECT h.msgid, h.subject, h.category FROM headers h,
> xref_headers x WHERE
> h.header_id = x.header_id AND x.newsgroup_id = 2 AND x.server_id IN )
> AND h.category = 'SINGLE' AND h.status = 'UNREAD' GROUP by h.header_id
> ORDER BY h.subject
> 
> Thanks,
> Tony
> 
> --- In [email protected], Gerard Lanois <gerardlanois@y...> wrote:
> > go into sub process_group
> > 
> > right *before* where it says 
> > 
> >              my $sth = $dbh->prepare($stmt);
> >              $sth->execute;
> > 
> > insert a print statment, so that it looks like this:
> > 
> >              print "SQL> $stmt\n";
> >              my $sth = $dbh->prepare($stmt);
> >              $sth->execute;
> > 
> > and tell me what it says
> > 
> > this dumps out the complete SQL statement text prior to 
> > executing it - it should help us understand how/why it
> > did not get put together correctly
> > 
> > 
> > 
> > --- Tony Bierman <biermana@h...> wrote:
> > > Help??
> > > 
> > > [biermana@localhost stable3]$ ./ubh -g
> > >
> >
>
------------------------------------------------------------------------------
> > > ubh 3.0b1, (C) 2000-2003 Gerard Lanois
> > > This software comes with ABSOLUTELY NO WARRANTY; for details use -w.
> > > This is free software, and you are welcome to redistribute
> > > it under certain conditions; see the file LICENSE for details.
> > >
> >
>
------------------------------------------------------------------------------
> > > 2003/04/16 16:04:08 ubh.process_servers INFO> Constructing list of
> groups
> > > to 
> > > process.
> > > 2003/04/16 16:04:08 ubh.process_servers INFO> Begin processing groups.
> > > 2003/04/16 16:04:08 ubh.process_group INFO> Begin processing group 
> > > alt.binaries.movies
> > > 2003/04/16 16:04:08 ubh.process_group INFO> Begin processing
> single part 
> > > articles.
> > > DBD::mysql::st execute failed: You have an error in your SQL
> syntax near ')
> > > 
> > > AND
> > > h.category IN ('UNKNOWN','SINGLE') AND h.status = 'UNREAD' GROUP
> by h.head'
> > > 
> > > at line 1 at ./ubh line 1752.
> > > DBD::mysql::st execute failed: You have an error in your SQL
> syntax near ')
> > > 
> > > AND
> > > h.category IN ('UNKNOWN','SINGLE') AND h.status = 'UNREAD' GROUP
> by h.head'
> > > 
> > > at line 1 at ./ubh line 1752.
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > _________________________________________________________________
> > > The new MSN 8: advanced junk mail protection and 2 months FREE*  
> > > http://join.msn.com/?page=features/junkmail
> > > 
> > >
> 
> 


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/W7NydA/hdqFAA/VygGAA/IHFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/