vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   How tables are modified after making an article (https://vborg.vbsupport.ru/showthread.php?t=287420)

zero477 09-03-2012 04:16 PM

How tables are modified after making an article
 
Hello to all,

I would like to know if there is a way of learning what happens when I do something in vBulletin ...

For example ... what tables are modified when I create an article ??

I want to know this because I need to migrate many articles ...

Greetings,
Eddie

kh99 09-07-2012 12:35 PM

I was kind of hoping that someone would answer this, because I'm not a database person and I was wondering if there was some way to montior changes to the database. But I can think of a couple of ways I might try: one is to put the site in debug mode and create an article, then look at the list of queries that were done and figure out which ones had to do with creating the article. Another would be to save the database to sql (probably using a test site without a lot of posts or threads), then create an article and save the sql again, and diff the two sql files (I have no idea how well this would work - it may be that table rows don't always come out in the same order when you dump a database so there'd be too many changes).

Of course you can always look at the code and see what's done when an article is created.

Lynne 09-07-2012 03:24 PM

Almost all the cms_* tables get modified when an article is created. If you really wanted to see exactly what happens, you would need to 'read' the code that is run when you click that Submit button.

Dead Eddie 09-08-2012 01:15 AM

I'd start with the cms_node, cms_nodeinfo, and cms_article tables.

The insert into the cms_node table is interesting...as I recall, initial data is inserted into the table when the create article page is loaded, before the article is saved. When the article is saved, the row is updated with the correct data.

Also, the noderight and nodeleft columns are used to describe the position of a node relative to other nodes...so when you calculate its position, you'll potentially have to update other records to make room for it.

Otherwise, it's mostly straightforward. :)


All times are GMT. The time now is 12:58 PM.

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.01026 seconds
  • Memory Usage 1,708KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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