Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Error Adding Comments
Scripul
Posted on 06 Jan 2010, 00:00:39

Access: Member
Total Posts: 3
Joined: 2010-01-05

I'm getting the following error whenever I try to add a comment to a news item:

"Unable to prepare: SELECT COUNT(id) AS userexists FROM news30_users WHERE user = ?"

Other than this one issue, everything is working perfectly. Great job with this!
#1446
Chris
Posted on 06 Jan 2010, 00:04:22

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

This is strange, when you try add a comment, are you using ajax comments?
#1448
Scripul
Posted on 06 Jan 2010, 00:07:45

Access: Member
Total Posts: 3
Joined: 2010-01-05

No, I am not...
#1452
Chris
Posted on 06 Jan 2010, 00:12:31

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Ah I found the problem. If you edit index.php, on line 875~ you'll see this line of text

Code:
$ex = DataAccess::fetch("SELECT COUNT(id) AS userexists FROM $newsusers WHERE user = ?", $name);


change that to

Code:
$ex = DataAccess::fetch("SELECT COUNT(uid) AS userexists FROM $newsusers WHERE user = ?", $name);


and it should correc the problem. Glad you found this, it somehow got overlooked.
#1453
Scripul
Posted on 06 Jan 2010, 00:16:03

Access: Member
Total Posts: 3
Joined: 2010-01-05

Yes, that corrected the problem! Thank you for the speedy reply and fix!!
#1454
Network-13.com © 2013