vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   SQL Query for Custom Avatars (https://vborg.vbsupport.ru/showthread.php?t=225679)

SnapOff Racing 10-21-2009 06:23 AM

SQL Query for Custom Avatars
 
When moving the Custom Avatars from the database to the filesystem I noticed that vb names the files as so avatar15_8.gif where 15=userid and 8=an incremented number. What I would like to know is where does vb store the information for that incremented number? Like let's say you goto move your avatars from the db to the fs and it fails so then let's say that one of your avatars are now named avatar15_1.gif but then you run it again and now your filename will be avatar15_2.gif since vb automatically increments this value. Well I would like to know where vb stores this value. I am assuming that it's stored in the database somewhere so as soon as I find it I could run an UPDATE query such as
Code:

ALTER TABLE `tablename` AUTO_INCREMENT = 1
so that way when I run an export of my avatars they will come out looking like avatar15_1.gif, avatar16_1.gif etc.

Lynne 10-21-2009 01:38 PM

If you look at the user table, you'll see a field called avatarrevision which is that second number in the avatar image name.

SnapOff Racing 10-21-2009 02:55 PM

Lynne FTW as always! Thank you :up:


All times are GMT. The time now is 03:05 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.01881 seconds
  • Memory Usage 1,706KB
  • 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)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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