willms_jay
05-13-2003, 01:29 AM
can someone help me pinpoint, on what line the query is made to add a post to the database?
what about a when a thread is added?
thanks in advance!
..jordan
Davey
05-13-2003, 01:44 AM
Reply:
In newreply.php, the post is added on line 305 in vB 230.
Look for:
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconi d','$visible')");
And in newthread.php, the thread is added on line 262 in vB 230:
Look for:
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p ostusername,postuserid,lastposter,dateline,iconid, visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$forumid','1','0','".addslashes($postusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$iconid','$visible','$attachcount')");
Dave.
PS: Hello, what happened here?
Xenon you should sort out this page layout :sleep:.
willms_jay
05-13-2003, 02:57 AM
another quick problem.
can someone tell me what's wrong here....
I located the line in new_reply.php and entered in this query directy after it
$DB_site->query("UPDATE sc_reviewaccounts SET posts = 3 WHERE userid = 1");
where sc_reviewaccounts has two columns,
userid and posts
there is an entry for userid = 0, but no matter how many times i test this to see if the query is working, it doesn't. the value in posts never changes.
can anyone spot the problem in the above query? it works in phpmyadmin....
willms_jay
05-13-2003, 03:01 AM
sc_reviewaccounts
userid int(11) auto_increment
numcredits int(11)
totalreviews int(11)
posts int(11)
Davey
05-14-2003, 02:09 AM
Try using this instead:
$DB_site->query("UPDATE sc_reviewaccounts SET posts='3' WHERE userid='1'");
The apostrophes (') surrounding the value is needed.
I had this problem also.
Dave.
Logician
05-14-2003, 09:12 AM
Yesterday at 07:01 AM willms_jay said this in Post #4 (https://vborg.vbsupport.ru/showthread.php?postid=394422#post394422)
sc_reviewaccounts
userid int(11) auto_increment
numcredits int(11)
totalreviews int(11)
posts int(11)
1- why is userid column auto_increment?
2- Is there a record with userid=1 info in the sc_reviewaccounts?
3- what exactly are u trying to achieve with that hack?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.