Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 05:34 am EST
Geeklog Forums
1064 SQl syntax errors when commenting
Anonymous
Anonymous
I've checked the previous inquiries about problems like this, and their solutions.. but it doesn't seem to be helping me.
1064: You have an error in your SQL syntax near ''this would be the message',now(),'and this would be the topic',140,'article')' at line 1
I get that when trying to post a comment as an anonymous user on my site.
When I login I am able to comment fine.
Now, in comment.php, I jotted down to line 190 and edited the database query a tad from this:
DB_save($_TABLES['comments'],'sid,uid,comment,date,title,pid,type',"'$sid',$uid,'$comment',now(),'$title',$pid,'$type'"
to look like this:
DB_save($_TABLES['comments'],'sid,uid,comment,date,title,pid,type',"'$sid','$uid','$comment','now()','$title','$pid','$type'"
Now, that looks the same except what I did was added single quotes around $uid, now(), and $pid
Upon doing that, any comments posted by anonymous would be posted by a 'ghost'.. in that, no uid would be designated to them (last comment ... by and the comment would be invisible in the 'recent comments'
Peculiar, I know - considering I didn't alter/modify anything to any code or database structures.
I tried commenting within IE6, Opera, and Lynx - no dice.
Appreciate any help I can get.
9
11
Quote
All times are EST. The time is now 05:34 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