vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   can someone help me pinpoint? (https://vborg.vbsupport.ru/showthread.php?t=52877)

willms_jay 05-13-2003 01:29 AM

can someone help me pinpoint?
 
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:
PHP Code:

$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')"); 

And in newthread.php, the thread is added on line 262 in vB 230:
Look for:
PHP Code:

$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,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

PHP Code:

$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:
PHP Code:

$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

Quote:

Yesterday at 07:01 AM willms_jay said this in Post #4
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?


All times are GMT. The time now is 12:39 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02919 seconds
  • Memory Usage 1,734KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete