Welcome to Geeklog, Anonymous Thursday, December 26 2024 @ 01:30 am EST
Geeklog Forums
SQL errors in stories
Status: offline
wheelsofterror
Forum User
Regular Poster
Registered: 09/02/06
Posts: 78
I put up my 16th story and received an SQL error on 16 on up but the other 15 still work. Is it a title length limit? The 16th title is Reviews-Movies-AndNowtheScreamingStarts-1973
Error says:
An SQL error has occurred. Please see error.log for details.
Error says:
An SQL error has occurred. Please see error.log for details.
6
6
Quote
Status: offline
wheelsofterror
Forum User
Regular Poster
Registered: 09/02/06
Posts: 78
On phpmyadmin in gl_stories, it says "PRIMARY and INDEX keys should not both be set for column `sid`"
Keyname Type Cardinality Action Field
PRIMARY PRIMARY 18 sid
stories_sid INDEX None sid
Keyname Type Cardinality Action Field
PRIMARY PRIMARY 18 sid
stories_sid INDEX None sid
7
7
Quote
Status: offline
wheelsofterror
Forum User
Regular Poster
Registered: 09/02/06
Posts: 78
To be honest, I didn't know where to get the error log. I found the index error, deleted the non primary sid table as an index. I deleted the story with the error and reentered it with a shorter id/title and it worked. I guess sql conks out after 40 character ids?
For future use, where is the the error log? I just fixed the error on a hunch.
For future use, where is the the error log? I just fixed the error on a hunch.
24
6
Quote
Status: offline
wheelsofterror
Forum User
Regular Poster
Registered: 09/02/06
Posts: 78
Ah, ok. I thought it was an SQL thing. But Dirk, what about this 40-character limit on file ids?
Here's the error log entry:
Mon 11 Sep 2006 20:46:23 MST - 1062: Duplicate entry 'Reviews-Movies-AndNowtheScreamingStarts-' for key 1. SQL in question: INSERT INTO gl_rating_totals (rt_id, item_type, score_min, score_max, count, total, created, owner_id, group_id) VALUES ('Reviews-Movies-AndNowtheScreamingStarts-1973', 'autotagged', '0', '5', '0', '0', NOW(), '1', '17')
I think it's related to the sql error: "PRIMARY and INDEX keys should not both be set for column `sid`" Somehow the entry reset an index key to the same as the primary. I don't understand if the file length did it but the story id was cut to 40 from 44 characters.
Here's the error log entry:
Mon 11 Sep 2006 20:46:23 MST - 1062: Duplicate entry 'Reviews-Movies-AndNowtheScreamingStarts-' for key 1. SQL in question: INSERT INTO gl_rating_totals (rt_id, item_type, score_min, score_max, count, total, created, owner_id, group_id) VALUES ('Reviews-Movies-AndNowtheScreamingStarts-1973', 'autotagged', '0', '5', '0', '0', NOW(), '1', '17')
I think it's related to the sql error: "PRIMARY and INDEX keys should not both be set for column `sid`" Somehow the entry reset an index key to the same as the primary. I don't understand if the file length did it but the story id was cut to 40 from 44 characters.
7
6
Quote
All times are EST. The time is now 01:30 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