Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 01:16 am EST
Geeklog Forums
1064 SQL errors upon install
Anonymous
Anonymous
I just tried reinstalling geeklog 1.3.6 but i still get an SQL error on all the story pages:
1064: You have an error in your SQL syntax near '86400 SECOND)) AND (date <= NOW()) AND (draft_flag = 0) AND ((perm_anon >= 2))' at line 1
I did remove the lines in mysql_tableanddata.php as per the docs. Could that be the problem?
I have tried it in netscape, on different machines, et al. And the error persists.
The attempted install is located at http://www.souljerky.com/threshold
I have reinstalled this several times & i know not what i have done incorrectly.
Any help would be appreciated.
Thank you!
16
14
Quote
Anonymous
Anonymous
I am using MySQL version 3.23.39 on a Cobalt RAQ.
The only other idiosyncracy that I have failed to mention is that I
couldn't really get the chown commands to work without pages of
failures. But the docs seem to indicate that this is probably not a
problem. And most of the scripts seem to work, besides the sql error.
I just emailed my sysadmin about upgrading. Hopefully that will do the
trick!
Thank you very, very much. I am extremely excited to use this software!
Best,
-
10
15
Quote
Status: offline
Markus Guske
Forum User
Newbie
Registered: 04/23/02
Posts: 6
Hi,
I have the save prob.
running my personal site http://www.guske.de at the german provider
Strato AG, which uses MySQL 3.22.32. Which seems to be to old.
I kill the mentioned index-statements for the 1.3.5sr2 version.
No I upgraded to 1.3.6 and the 1064 SQL error appears. I dropped the
index on table group_assignments as mentioned in the docs, but the
error is still there.
Dirk, can you tell me which SQL is responsible for the message, so I can
fix it in my installation. This would help.
Thanks in advance,
Markus
P.S.: By the the table-rename for staticpages also didn't work. I
commented out the corresponding lines in install.php and dropped and
created the table by my own and rerun the install.php page. Maybe this
is also a new feature of MySQL.
11
12
Quote
Status: offline
Markus Guske
Forum User
Newbie
Registered: 04/23/02
Posts: 6
Hello,
I found out, that in lib-common.php COM_whatsNewBlock contains the
responsible code:
$sql = "SELECT count(*) AS count FROM {$_TABLES['stories']} WHERE
(date >= (NOW() - INTERVAL {$_CONF['newstoriesinterval']} SECOND))
AND (date <= NOW()) AND (draft_flag = 0) AND (" . $nesql . "";
I disabled the corresponding block and it works. Surely, this is only a
workaround.
I put back the old code, but this doesn't work.
Maybe tomorrow I got the fix for older MySQL version, or any other has
the solution right now.
Thanks,
Markus
9
13
Quote
Anonymous
Anonymous
hab das selbe problem... auch bei strato...
wenn es inzwischen nen ordentliches patch gibt wäre es klasse wenn jemand was schreibn könnte, wo man diesn findet
15
11
Quote
Status: offline
Markus Guske
Forum User
Newbie
Registered: 04/23/02
Posts: 6
Hi,
the problem is solved.
You have to change the following lines in lib-common.php:
$sql = "SELECT count(*) AS count FROM {$_TABLES['stories']} WHERE (date >= (NOW() - INTERVAL {$_CONF['newstoriesinterval']} SECOND)) AND (date <= NOW()) AND (draft_flag = 0) AND (" . $nesql . "";
TO
$sql = "SELECT count(*) AS count FROM {$_TABLES['stories']} WHERE (date >= (date_sub(NOW(), INTERVAL {$_CONF['newstoriesinterval']} SECOND))) AND (date <= NOW()) AND (draft_flag = 0) AND (" . $nesql . "";
and
$sql .= "{$_TABLES['comments']}.date >= (NOW() - INTERVAL {$_CONF['newcommentsinterval']} SECOND)) AND ((" . $stwhere . " OR (" . $powhere . ")";
TO
$sql .= "{$_TABLES['comments']}.date >= (DATE_SUB( NOW(),INTERVAL {$_CONF['newcommentsinterval']} SECOND))) AND ((" . $stwhere . " OR (" . $powhere . ")";
within the function COM_whatsNewBlock(..)
The fix: change the function format from -/+ to DATE_SUB()/DATE_ADD.
The main hint comes from Benjamin (maran).
Thanks for helpin' us.
Here is the corresponding text from the MySQL-Manual: http://www.mysql.com/doc/en/Date_and_time_functions.html
Hope that helps,
~ Markus
11
13
Quote
All times are EST. The time is now 01:16 am.
- 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