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
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 (), 27 Guests and 11 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
How to hide sub forums from summary page
by Ruben Rocha
Today at 02:58 PM
Spell Check [beta]
by Bill B
Yesterday at 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
Yesterday at 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
Yesterday at 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
Yesterday at 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
David DelMonte, nick1, Begbie, cenk, MATTO
13363 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks