Welcome to Geeklog, Anonymous Friday, April 19 2024 @ 02:49 pm EDT

Geeklog Forums

mysql_error


peer

Anonymous
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?!
 Quote

Hayrettin

Anonymous
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.
 Quote

Hayrettin

Anonymous
No help? I'm in desperate situation.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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

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:
Text Formatted Code
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
 Quote

Hayrettin

Anonymous
I'm begging on my knees
It's driving me crazy, pls drop a few lines to enlighten me...
 Quote

Hayrettin

Anonymous
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...
 Quote

Status: offline

Hayrettin

Forum User
Newbie
Registered: 10/17/04
Posts: 4
Location:Turkey
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 &lt; unix_timestamp() -
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
 Quote

Status: offline

Hayrettin

Forum User
Newbie
Registered: 10/17/04
Posts: 4
Location:Turkey
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?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by Hayrettin: Umm.. I searched config.php for $_CONF['polladdresstime'] variable and couldn't find it!

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
 Quote

Status: offline

Hayrettin

Forum User
Newbie
Registered: 10/17/04
Posts: 4
Location:Turkey
Understood. I'll get them done and let you know. Thank you so very much.
 Quote

Status: offline

Hayrettin

Forum User
Newbie
Registered: 10/17/04
Posts: 4
Location:Turkey
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!
 Quote

All times are EDT. The time is now 02:49 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content