URL to your eFiction: http://ksarchive.com
Version of eFiction: 3.5.1
Have you bridged eFiction, if so with what?: no
Version of PHP: 4.4.2
Version of MySQL: 4.0.27-standard
Have you searched for your problem: Yes
If so, what terms did you try: Favorites, Favorite Author
State the nature of your problem: When trying to add a favorite author, the error below is generated. Adding a favorite story or series does work.
Do you have a test account for us? user: testmember password: efic
This is the error:
A fatal MySQL error was encountered.
Query: INSERT INTO eficfanfiction_favorites(uid, item, type, comments) VALUES ('2', '10', 'AU', '') ON DUPLICATE KEY UPDATE comments = ''
Error: (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 'ON DUPLICATE KEY UPDATE comments = ''' at line 1
I did check the fanfiction_favorites table to look for duplicates and check the index; everything looks okay.
Any help greatly appreciated!
That is weird. I could add a Favorite story with no problems but not author. You might have to reupload some of the templates storyindex.tpl, viewstory.tpl and maybe viewuser.php and favau.php (which is found in the User folder).
******************************************
Mucking around in eFiction since circa 2001 (ver. 1.0)
Now running v.3
Hi, thank you so much for trying to help. I replaced all those files, but no luck, same error. Appreciate it anyway.
ETA: It seems like it must be something with this line in favau.php:
$result = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_favorites(uid, item, type, comments) VALUES ('".USERUID."', '$a', 'AU', '$comment') ON DUPLICATE KEY UPDATE comments = '$comment'");
because when I try to add a favorite author with a comment (I was leaving it blank before), I got this:
A fatal MySQL error was encountered.
Query: INSERT INTO eficfanfiction_favorites(uid, item, type, comments) VALUES ('2', '10', 'AU', '
She is the best.
') ON DUPLICATE KEY UPDATE comments = '
She is the best.
'
Error: (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 'ON DUPLICATE KEY UPDATE comments = '
She is the best.
'' a
ETA: Never mind, I determined it's because I'm running MySQL 4.0.27. Upgrading to 4.1 will very likely fix it. Thanks again!