php forum
php mysql forum
php mysql smarty
 
Page 2 of 6 < 1 2 3 4 5 6 >
Topic Options
#258526 - 01/02/04 11:46 AM Re: Useful MySQL Queries for UBB.Threads [Re: charts]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md

   Re: Useful MySQL Queries for UBB.Threads to Del.icio.us Add to del.icio.us
  Digg Re: Useful MySQL Queries for UBB.Threads Digg it
UPDATE w3t_Users<br />SET U_Totalposts = 'NEWTOTALHERE' <br />WHERE U_Username = 'USERNAMEHERE'<br /><br />UPDATE w3t_Users<br />SET U_Registered = UNIX_TIMESTAMP('2003-10-16') <br />WHERE U_Username = 'USERNAMEHERE'<br /><br />Change the date to what you want <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" />
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#258527 - 01/05/04 06:38 PM Re: Useful MySQL Queries for UBB.Threads [Re: sf49rminer]
Beentheredonethat Offline
Member

Registered: 05/10/02
Posts: 160
Loc: Not here
Thanks. <br />Tryed that but did not work. <br />Is it the same if username and displayed name are not the same? <br /> <br />also... is there a way to show the real number of posts for a user... this user had a problem and the number of posts changed... would really like to show the reasl number of posts

Top
#258528 - 01/05/04 08:20 PM Re: Useful MySQL Queries for UBB.Threads [Re: charts]
Storm_dup1 Offline
Member

Registered: 08/03/02
Posts: 263
Loc: Somewhere above Texas
What would a query be to look up people who have registered but not yet verified their e-mail addies to be real?
_________________________
Some people read their stars..... I choose to write my own

Top
#258529 - 01/05/04 08:50 PM Re: Useful MySQL Queries for UBB.Threads [Re: ]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
U_Username is DisplayName <br /> <br />U_LoginName is the loginname <br /> <br />Those queries above will do exactly what you asked for. You say they dont what is the error you get. You can also suppliment the WHERE U_Username = 'USERNAMEHERE' to WHERE U_Number = 'usernumberhere' Make sure you are not forgetting the slashes around the name or number in the where clause. <br /> <br />As far as getting a post count <br /> <br />SELECT COUNT(*) <br />FROM w3t_Posts <br />WHERE B_PosterId ='USERNUMBERHERE' <br /> <br />Then to update the users total <br /> <br />UPDATE w3t_Users <br />SET U_TotalPosts = 'TOTALHERE' <br />WHERE U_Number = 'USERNUMBERHERE'
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#258530 - 01/07/04 05:20 PM Re: Useful MySQL Queries for UBB.Threads [Re: sf49rminer]
Pasqualist Offline
Member

Registered: 01/30/03
Posts: 285
Loc: Amsterdam, The Netherlands
Which query would I need to change the url in U_Picture (Users) ?<br /><br />Example "http://www.domain1.com/forum/userpics/2.jpg"<br /><br />should be changed in<br /><br />Example "http://www.name2.com/forum/userpics/2.jpg"<br /><br />Thanks!

Top
#258531 - 01/07/04 06:02 PM Re: Useful MySQL Queries for UBB.Threads [Re: 10k]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
You changed the config avatar directory in the setup? This is the directory where pictures are.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#258532 - 01/07/04 06:38 PM Re: Useful MySQL Queries for UBB.Threads [Re: sf49rminer]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
No the URL to the avatar is stored in U_Picture - the value in the config file is just for uploads and used when it's being stored.<br /><br />This should do it:<br /><br />UPDATE w3t_Users<br />SET U_Picture = 'http://whatever/what/userpic/2.jpg'<br />WHERE U_Number = xxx<br /><br />Put the usernumber of xxx<br /><br /><img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#258533 - 01/08/04 02:20 AM Re: Useful MySQL Queries for UBB.Threads [Re: Daine]
Pasqualist Offline
Member

Registered: 01/30/03
Posts: 285
Loc: Amsterdam, The Netherlands
Thanks Josh, but your query would not do the trick for me.. <img src="http://www.ubbdev.com/forum/images/graemlins/laugh.gif" alt="" /><br /><br />I want to change the picture URL for all users, so I only need to change "domain1.com" to "name2.com".

Top
#258534 - 01/08/04 08:29 AM Re: Useful MySQL Queries for UBB.Threads [Re: 10k]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
you need a query that first grabs the link from the database in a query and then pulls the substring of the first domain and inserts the substring of the second domain and then inserts that into the database... but thats a little dangerous if not used correctly..


Edited by scroungr (01/08/04 08:36 AM)
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#258535 - 01/08/04 08:34 AM Re: Useful MySQL Queries for UBB.Threads [Re: 234234]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
This will do what you want Pasqualist and is courtesy of Master Scream when I asked him about this issue a while back. <br /> <br />Now this query is mostly for those wanting to update their forums from UBB to Threads and change links in the post bodies as this is where this issue is likely to occur. <br /> <br />UPDATE w3t_Posts SET B_Body = REPLACE(B_Body, 'cgi-bin/ubb','ubbthreads') <br /> <br />Now you can change this query to suit your needs by doing the following to it. <br /> <br />UPDATE w3t_Users SET U_Picture = REPLACE(U_Picture, 'www.domain1.com','www.name2.com') <br /> <br />Now remember to backup your database before doing this but I have ran the first query on my install and it worked fine. It should automatically update the part of the string you want.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#258536 - 01/08/04 08:35 AM Re: Useful MySQL Queries for UBB.Threads [Re: sf49rminer]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
even better <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#258537 - 01/08/04 09:02 AM Re: Useful MySQL Queries for UBB.Threads [Re: 234234]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
LOL Yeah I had asked the MASTER a while back as I still had links in posts to my old ubb install graemlins etc
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#258538 - 01/08/04 09:10 AM Re: Useful MySQL Queries for UBB.Threads [Re: sf49rminer]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
forgot all about the mysql REPLACE command <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#258539 - 01/08/04 01:03 PM Re: Useful MySQL Queries for UBB.Threads [Re: Daine]
CurlGirl Offline
Newbie

Registered: 12/20/03
Posts: 18
Ok....I have a request since I'm in the "throws" of re-installing. <br /><br />Would it be possible to repost something as an ADMIN (with the boards closed) and then change the ADMIN association to the original poster? This is so I can re-post threads lost with my ... huhummm... re-installation?<br /><br />Thanks,<br />Patrice

Top
#258540 - 01/08/04 01:27 PM Re: Useful MySQL Queries for UBB.Threads [Re: GrandAmEmt]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
think it's easier to log in as the user... you can switch to them in the admin panel... problem is boards would have to be open not closed..
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#258541 - 01/08/04 04:14 PM Re: Useful MySQL Queries for UBB.Threads [Re: 234234]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
If your missing threads from your threads database after the install of your UBB classic database conversion that malfunctioned after an import and the board went down after running threads for a few days then you can use PhpMyAdmin to input users and posts after the original conversion.<br /><br />I take it now you have a correct conversion running. Just use PHPMYADMIN to import any new users into Threads that are missing from your last Threads backup when it was working before it crashed.<br /><br />You then can do the same thing with the posts table.<br /><br />INSERT INTO `w3t_Users` VALUES ( blah blah blah);<br /><br />INSERT INTO `w3t_Posts` VALUES ( blah blah blah);<br /><br />Your backups when you compare should guide you further where the cutoff is. Problem is if you opened your board back up now after the second import then you cant do this as post numbers and user numbers will have been used that you are trying to import.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#258542 - 01/08/04 04:38 PM Re: Useful MySQL Queries for UBB.Threads [Re: sf49rminer]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
yeah but Omego the way it sounds..<br /><br />[]<br />Would it be possible to repost something as an ADMIN (with the boards closed) and then change the ADMIN association to the original poster? This is so I can re-post threads lost with my ... huhummm... re-installation?<br />[/]<br /><br />is that she wants to post those lost as herself then go in later and change the name of who posted it to the original person cause she lost them...

Top
#258543 - 01/08/04 05:11 PM Re: Useful MySQL Queries for UBB.Threads [Re: 234234]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
If she lost the posts and does not have a backup to do what I am saying then how is she going to know what to post to do what your saying <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" /><br /><br />See my point.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#258544 - 01/09/04 10:14 AM Re: Useful MySQL Queries for UBB.Threads [Re: sf49rminer]
CurlGirl Offline
Newbie

Registered: 12/20/03
Posts: 18
Glutton for punishment. My solution. Probably not the best, but it got the job done. I ended up make all the forums "read-only" with admin and MODERATOR read/write. Made the user a temporary moderator, logged in as them and reposted their thread and demoted them. I'm cross-eyed, but it's done. Whew. Think I'll BACK IT UP now! <img src="http://www.ubbdev.com/forum/images/graemlins/grin.gif" alt="" /> <br /> <br />-Patrice


Edited by CurlGirl (01/09/04 10:16 AM)

Top
#258545 - 01/09/04 10:20 AM Re: Useful MySQL Queries for UBB.Threads [Re: GrandAmEmt]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
You did the things the hard way. Reporting one thread at a time. You could have inserted the new posts via PHPMYADMIN in one step.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
Page 2 of 6 < 1 2 3 4 5 6 >


Who's Online
0 Registered (), 39 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Blogs, love em or hate em?
by Ian_W
10/05/08 03:47 PM
What do you use to edit the files
by Ian_W
10/05/08 03:33 PM
BeyondCompare v3.00
by Ian_W
10/05/08 03:32 PM
Glossy Black Theme with Image Reflection
by Gizmo
10/05/08 02:17 PM
ShareThis
by Gizmo
09/28/08 05:06 AM
[7.3] Viewing MySQL logfiles made easier
by AllenAyres
09/27/08 09:57 PM
Looking for a simple upload script
by Murphdog
09/26/08 08:45 PM
New Mods
[7.3] Viewing MySQL logfiles made easier
by blaaskaak
09/24/08 05:39 PM
[7.3] Language file checker
by blaaskaak
09/09/08 12:56 AM
[7.3.1] add search to showmembers page
by blaaskaak
09/07/08 04:50 AM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
ghengis317, NitroX, Dogan, EliYah-, W-D
13344 Registered Users
Top Posters Last 30 Days
AllenAyres 16
blaaskaak 13
FREAK1 7
Mike L_dup1 4
Chris Bale 4
Ian_W 4
W-D 3

 

 

 
fusionbb message board php hacks