View Single Post
  #1  
Old 02-19-2016, 09:11 PM
Skyrider Skyrider is offline
 
Join Date: Feb 2006
Location: Netherlands
Posts: 1,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Remove Avatars if file is non-existing in local/filestorage

There were over 5.000 broken file avatars within customavatars directory of which I had to remove. But thus far, vBulletin does not support anyway to remove the attached avatars from the users if the file no longer exists on the filesystem (not database). For funsies, I've rebuild the custom avatars, and didn't work at all.

I noticed that kh99 has created a php file here:
https://vborg.vbsupport.ru/showthread.php?t=281878

https://vborg.vbsupport.ru/attachmen...8&d=1335042680

But I'm afraid I'm getting a database error with it:

Quote:
Database error in vBulletin 4.2.3:

Invalid SQL:
DELETE FROM customavatar WHERE userid IN(4165,,4168,4169,4173,4174,4175,4176,4177,4178,4 179,4180,4181,4182,4185,4189,4 190,4192,4193,4195,4196,4198,4199,4201,4203,4204,4 205,4210,4212,4215,4216,4218,4 220,4221,4222,4223,4224,4225,4227,4229,4231,4234,4 235,4236,4238,4241,4242,4243,4 244,4245,4246,4247,4248,4249,4252,4254,4255,4256,4 257,4260,4261,4262,4263,4265,4 266,4268,4269,4270,4271,4272,4273,4275,4276,4278,4 279,4281,4282,4284,4285,4287,4 288,4290,4291,4294,4295,4296,4297,4298,4299,4301,4 302,4304,4306,4307,4309,4310,4 311,4314,4316,4317);

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '4168,4169,4173,4174,4175,4176,4177,4178,4179,4180 ,4181,4182,4185,4189,4190,4192 ,' at line 1
Error Number : 1064
and:

Quote:
PHP Warning: mysqli_query(): (42000/1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '4168,4169,4173,4174,4175,4176,4177,4178,4179,4180 ,4181,4182,4185,4189,4190,4192 ,' at line 1 in ..../includes/class_core.php on line 1394
I've already PM'd kh99 regarding this, but I am unsure when he'll visit the forums again or if he would read my pm in regards of the no-pm policy he has. I appreciate all the help I can get .
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02639 seconds
  • Memory Usage 1,765KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete