Posted on: 04/18/04 10:14am
By: Anonymous (peer)
An SQL error has occured. Please see error.log for details.
And in my log file:
Sun Apr 18 15:59:22 2004 - 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1. SQL in question: DELETE FROM verband_pollvoters WHERE date
can anybody help me?!
mysql_error
Posted on: 10/17/04 06:24am
By: Anonymous (Hayrettin)
I'm getting the same error too. It reads: 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1. SQL in question: DELETE FROM gl_pollvoters WHERE date
I'm running Geeklog 1.3.9sr2 and I need urgent help please.
mysql_error
Posted on: 10/17/04 11:17am
By: Anonymous (Hayrettin)
No help? I'm in desperate situation.
mysql_error
Posted on: 10/17/04 03:58pm
By: Dirk
[QUOTE BY= Hayrettin] 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1. SQL in question: DELETE FROM gl_pollvoters WHERE date[/QUOTE]
Is this the exact error message you're getting? Nothing more after the "date"?
This obviously comes from this line in function COM_showPoll in lib-common.php:
DB_query( "DELETE FROM {$_TABLES['pollvoters']} WHERE date < unix_timestamp() - {$_CONF['polladdresstime']}" );
As you can see, there's more to come after the "date" ...
bye, Dirk
mysql_error
Posted on: 10/17/04 03:58pm
By: Anonymous (Hayrettin)
I'm begging on my knees
It's driving me crazy, pls drop a few lines to enlighten me...
mysql_error
Posted on: 10/17/04 04:01pm
By: Anonymous (Hayrettin)
Thanks very much Dirk... The exact line in my log file is:
Sun Oct 17 03:17:17 2004 - 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1. SQL in question: DELETE FROM gl_pollvoters WHERE date
I cant figure out what it is. It was working properly until yesterday...
mysql_error
Posted on: 10/17/04 04:05pm
By: Hayrettin
Sorry, it ends like this:
Sun Oct 17 03:17:17 2004 - 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1. SQL in question: DELETE FROM gl_pollvoters WHERE date < unix_timestamp() -
mysql_error
Posted on: 10/17/04 04:09pm
By: Dirk
Make sure you have the variable $_CONF['polladdresstime'] set in config.php. The default is
$_CONF['polladdresstime'] = 604800;
It may also be a side-effect of a parse error in the config.php. Did you edit it recently?
bye, Dirk
mysql_error
Posted on: 10/17/04 04:14pm
By: Hayrettin
Umm.. I searched config.php for $_CONF['polladdresstime'] variable and couldn't find it!
Yes, I changed the config.php recently. I wanted to change the admin e-mail yesterday and this error started to occur right after that change.
What do you suggest?
mysql_error
Posted on: 10/17/04 04:21pm
By: Dirk
[QUOTE BY= Hayrettin] Umm.. I searched config.php for $_CONF['polladdresstime'] variable and couldn't find it![/QUOTE]
Well, then add it ...
You should also compare your config.php against the one from the Geeklog tarball to see if you're missing other options as well.
bye, Dirk
mysql_error
Posted on: 10/17/04 04:29pm
By: Hayrettin
Understood. I'll get them done and let you know. Thank you so very much.
mysql_error
Posted on: 10/17/04 05:03pm
By: Hayrettin
When I double checked my config.php file I noticed that the end of file was missing (including the poll configuration part)! I think the machine missaved the file and that was the problem. I should have noticed it sooner. Sorry to bother you.
Thank you very much again for being there and sorting the issue out. Take care!