URL to your eFiction: http://www.savingsarasidle.com/fanfiction
Version of eFiction: 3.5
Have you bridged eFiction, if so with what?: No
Version of PHP: 5.2.8
Version of MySQL: 5.0.67
Have you searched for your problem: (yes/no)
If so, what terms did you try: ffics_fanfiction_authorprefs WHERE stories > 0 ) Error: (1064), Error: (1064)
State the nature of your problem: A fatal MySQL error was encountered.
Query: SELECT count(distinct uid) FROM ffics_fanfiction_authorprefs WHERE stories > 0 )
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 ')' at line 1
Do you have a test account for us? Username: EFTest, Password: 1234abc
Version of PHP: 5.2.8
Version of MySQL: 5.0.67
Another user also reported having a similar problem:
https://efiction.org/forums/index.php?topic=6771.0
Although no solution has been offered yet, I may suggest trying to fixes listed here if you haven't done so yet, because it may be related.
I did as you suggested but alas to no avail.
I found none of those queries in my stories.php file.
I guess all I can hope as that the person who chooses to challenges will be submitting from their own name, and that their own ID comes up when it asks you to choose a story.
Version of PHP: 5.2.8
Version of MySQL: 5.0.67
URL to your eFiction: Still under construction. Not yet public
Version of eFiction: 3.5
Have you bridged eFiction, if so with what?: No
Version of PHP: 5.2
Version of MySQL: 4.1.22
Have you searched for your problem: Yes, and I found this post and this post.
If so, what terms did you try: Query: SELECT count(distinct uid)
State the nature of your problem: fatal MySQL error was encountered.
Query: SELECT count(distinct uid) FROM ef_fanfiction_authorprefs WHERE stories > 0 )
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 ')' at line 1
Do you have a test account for us? If necessary.
I'm having the same problem with the Challenges module as the two people who already posted about this. In addition to this error, there doesn't actually seem to be a way to respond to the challenge under your own ID either. If someone would like to take a closer look I can PM you a link and test account info. I tried the changes suggested in the post above and in all of the the threads linked from that. I even tried re-uploading stories.php from version 3.4.3 and still the same error comes up. I'm not sure what else to try.
My problem is different. I can actually respond, and I have received responses, its just that you cant choose another author.
Version of PHP: 5.2.8
Version of MySQL: 5.0.67
I hope you don't mind that I peeked at your site using the test account you provided here. Beautiful site, by the way. Huge CSI fan myself.
Maybe I'm confused on how this module works, because when I tried clicking "respond to the challenge" on your site, I got the same thing that happens on mine. I come to a page that shows the following:
test challenge by EFTest
Stories
No results found.
Series
No results found.
(submit button here)
So, lets say EFTest wants to submit a response, how is that done? I clicked "submit" and it takes me to a blank page like it does on my own site. There's no where to go from there.
Aside from that (and maybe I'm just mixed up on how it works), I think our problem with the choose another author option is the same.
The way challenges work, is you write your story first. Then after it's written if you click on respond to challenge it will pull up your stories in your Account Info. From there you pick a story you written and what challenge you want it connected to.
******************************************
Mucking around in eFiction since circa 2001 (ver. 1.0)
Now running v.3
Oh god, I feel like such a dork. That makes perfect sense, Becca and I don't know why I didn't figure that out. Thank you so much for explaining it to me. I tried it and it worked perfectly, of course.
Can you tell me what the purpose of the "choose another author" option is? It seems to me that most people responding to a challenge would be using their own author accounts to do so anyhow, wouldn't they? The point I'm trying to make here is that if that option is not needed or necessary, is there a bit of code I can remove from one of the files in the challenges module to have it disappear completely? I imagine that would be an easy fix for the error I'm getting.
Wow, my face is red. I was playing with the challenges module under a test account and I realised that the "Choose another author" option is for Admin only. Makes perfect sense now.
Still wondering if I can just remove that line altogether though if there is no fix for the error. I've been searching all the files and can't seem to find it to delete it, so if someone could point me in the right direction, I'd be really appreciative.
As Admin you would be the only person who even sees the Choose an Author choice. That is so the Admin can submit others works to a challenge if they need to or are asked to I submit the story for them. I think you can (as Admin) just ignore it without having to take it it. As Admin it should work if you have authors who have stories posted. Then it will give you the list of people who actually have stories in their accounts.
Are you still getting the error? Is debug on? Maybe turning that off will make the error go away.
barb
******************************************
Mucking around in eFiction since circa 2001 (ver. 1.0)
Now running v.3
Whoops, misread your name. My apologies, Barb. Thank you for explaining how everything works.
Yes, debug is off and I still get the error posted above if I click "Choose another author". I suppose it's not as huge of an issue now that I know Admins will be the only ones who can see it, but I won't be able to submit other works to a challenge. It's something I could probably ignore for now, but it might be nice to fix eventually in case I need it. Not urgent, but if anyone has a suggestion for something I could try, I'm all ears.
Damdidaaa. I just experienced the same problem, did a little search and stumbled across this thread and the unanswered thread here reporting the same problem.
So I played around a little. The problem turned up on eFiction version 3.5 with Challenges 1.4 installed. I also run a 3.1.1 with challenges 1.2 and on that one it works.
What I figured out so far is: It doesn't have anything to do with stories.php (I fixed that one. Everything else is working fine now. it's just the challenges and not being able to add another author's story as a admin ....)
it seems to be a problem in the challenge.php
I looked at line 238 where I found the reportet Syntax problem from the error message:
A fatal MySQL error was encountered.
Query: SELECT count(distinct uid) FROM ENGLISHfanfiction_authorprefs WHERE stories > 0 )
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 ')' at line 1
don't quite get the "line 1" part .. anywho. This is line 238 where the error seems to occur:
$countquery = "SELECT count(distinct uid) FROM ".TABLEPREFIX."fanfiction_authorprefs WHERE stories > 0 ".(isset($letter) ? " AND $letter" : "").")";
now I'm no coder and I don't know jack about php and such ... but in HTML you need to close every tag and every < needs a > ... am I wrong or do you have to close all brackets in those syntax-thingies and isn't there one ) too much in the end? Or is there a qotation mark missing or one too much ... the error refers to a wrong syntax near ')' so that's where I started looking, but I just don't know enough about this π
Anyone got an idea??
Edit: Playing around (it's all trial and error for me *lol*) I just took out the .")" bit so the line ends on
(isset($letter) ? " AND $letter" : "");
now.
When I click on "choose another author" now, I don't get an errormessage anymore. It actually does display the site but there's something weird now. So I have all names displaying now ... 3 times. I have 55 members and only 3 Authors on that site so I guess where those triplelistings come from. it also lists each and every member with the amount of stories the actual authors have, so it says twice that the person has 7 stories and once it says that there's 49 stories ...
This is a testenvironment on a local server so I tried it on the real site, too and it shows the same behaviour. All names get listed 3 times. with the different amount of stories of the 3 authors. (sorry, bad in explaining)
funny thing: if I click on any of the three names of my authors the stories are pulled up as it should be.
I am happy to add a testaccount to the - only barely set up - english part of the site so you can see for yourself. Right now I only tested it on the german part (won't help you *lol*) Just PM me about that (as it would have to be an admin-account I won't post the logins here.)
I did add a few mods like the last visit and changing category image to a link (in both, the categories.php and the categories block on the index), fixed the stories.php but I think it doesn't have too much to do with those, right? as it only pulls up the challenges.php ...
Help would be appreciated π
Edit 2:
I just tried it with debugging on ... nothing turns up on CSSzen skin. Was just a thought but it didn't really help me out π
Old
URL: http://fiction.intayale.de
Version: 3.3.1
Modules: Challenges, Story Tracker, Mulit-lang. eFiction
PHP: 4.4.8
MySQL: 5.0.51a
New
URL: http://intayale.de/deFiction
Version: 3.5
Modules: Last Login
PHP: 5.2.9
MySQL: 5.0.77
In these cases usually what I do is trying to match them up and delete them to see if there's extra. Order also matters, though.
I'll usually look for the close matched pairs first, the ones in the middle, like around ".TABLEPREFIX." and (distinct uid), then move on to the ones at the end since they're more complicated. My result is that I think there could be an extra ). It's probably the last one.
There are definitely only 3 ( but 4 ). (I'm also a little confused by the " at the end, but they match up number-wise.)
In other words, try this:
$countquery = "SELECT count(distinct uid) FROM ".TABLEPREFIX."fanfiction_authorprefs WHERE stories > 0 ".(isset($letter) ? " AND $letter" : "")."";
Hi Lyndsie,
Thx for looking into it!
I tried your solution and it has the same effect I reported after trying my solution (just matching it to the line like two lines above)
So no matter if I use yours or mine:
$countquery = "SELECT count(distinct uid) FROM ".TABLEPREFIX."fanfiction_authorprefs WHERE stories > 0 ".(isset($letter) ? " AND $letter" : "");
I don't get another error report. What I get is this: screenshot
(Yes, I know. Screenshot doesn't help as you can't look at the source code and such, but just so you get the idea *lol*)
So the situation is: I have 55 Members on my page and I have 3 Authors (Amancham, Katria and Bronx) While Amancham has 49 stories, Katria and Bronx have 7 each. The links are working. So I click on any name I get sent to the author's storylist and can choose and add. But of course for the members not having any stories, I get a list saying no results found.
The list of members is ordered by names, breaks off after 75 listings (25 members, each 3 times listed) and the last member is lea ... so there's a lot missing. *g*
I don't really get it and it's way over my head, I'm afraid. I can work with this so far, as the current 3 authors are in that list so I can chose them. The script just seems to have problems with the listing part somehow. But like I said: I don't know enough to attempt to fix it. I really don't want to mess around with Tammys code. I'm just starting to work my way into php *lol*
like I said: I'm happy to set up an account if that is any help.
Old
URL: http://fiction.intayale.de
Version: 3.3.1
Modules: Challenges, Story Tracker, Mulit-lang. eFiction
PHP: 4.4.8
MySQL: 5.0.51a
New
URL: http://intayale.de/deFiction
Version: 3.5
Modules: Last Login
PHP: 5.2.9
MySQL: 5.0.77
There are definitely only 3 ( but 4 ). (I'm also a little confused by the " at the end, but they match up number-wise.)
If I'm thinking about what you're thinking, that's because of the (x=x ? y : z) statement, and then the actual query speech mark ... I think.
--
The problem looks like, to me, to be of this $letter business.
if($let == _OTHER) $letter = _PENNAMEFIELD." REGEXP '^[^a-z]'";
else if($let) $letter = _PENNAMEFIELD." LIKE '$let%'";
I don't use the challenges, so I can't play around with it though.
Although this isn't a fix, and might fuddle it up even more, what happens when you user this:
$countquery = "SELECT COUNT(DISTINCT uid) FROM ".TABLEPREFIX."fanfiction_authorprefs WHERE stories > 0";
This looks like it's admin only though. (And I can't find any place where $countquery is actually being used in challenges.php ... do you know where it is in the other files? o.O) What does the page look like when you're viewing as a member/guest? Or is it an admin-only feature anyway? π
archive:
site:
Available for skin/mod commission! π
