vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   HELP in mySQL (https://vborg.vbsupport.ru/showthread.php?t=37540)

wolfe 04-17-2002 08:20 AM

HELP in mySQL
 
hi i was woundering if anyone knows how i can do this

the prob is that i accidently deleted userid1 which was me :(

and all my 700 and odd posts went to userid0 = guest

so i reimported my self and all my posts are still guest


i was woundering if anyone knoe how you can Mass select posts in mySQL

only ones by me

and mass change them to

userid1


thanx in advance.

Neo 04-17-2002 03:05 PM

UPDATE posts SET userid='1', username='yourusername' WHERE userid='0'

or whatever it is equal to.

Admin 04-17-2002 03:19 PM

Quote:

Originally posted by neo
UPDATE posts SET userid='1', username='yourusername' WHERE userid='0'
The name of the table is `post`, and you don't need to update the username. And that query will just make all the guest's posts to appear as his (even posts that wasn't posted by him).

Use this:
Code:

UPDATE post SET userid=1 WHERE username='YourUsername';

wolfe 04-17-2002 07:50 PM

thanx guys worked a treat

wolfe 04-17-2002 08:00 PM

is there anyway of making the posts and threads off a Old DataBase in the right order to add to a new database with posts already on it


All times are GMT. The time now is 01:28 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.02134 seconds
  • Memory Usage 1,712KB
  • 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)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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