MyBB Community Forums
[Tutorial] Common SQL queries and how to run them - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: Tutorials (https://community.mybb.com/forum-38.html)
+--- Thread: [Tutorial] Common SQL queries and how to run them (/thread-44380.html)

Pages: 1 2 3 4 5 6


RE: [Tutorial] Common SQL queries and how to run them - Salih I - 2011-05-08

Matt what is the sql query to delete all the threads of a SINGLE USER???

DELETE FROM `mybb_threads` WHERE `uid` = '145'
is this right?


RE: [Tutorial] Common SQL queries and how to run them - faviouz - 2011-05-08

Yes, it is right.

I recommend backing up your mybb_threads table first though, just in case something goes wrong.


RE: [Tutorial] Common SQL queries and how to run them - OldeWolfe - 2011-09-05

With more than one board admin, how does one know what one's uid is? Or are all the admin's uid's the same, meaning it is a group designation and not an individual?


RE: [Tutorial] Common SQL queries and how to run them - 4users - 2011-11-29

i do upgrade mybb
I gave my password, but show error
I use this training so I changed the password to the test but show :

Error
The password you entered is incorrect. If you have forgotten your password, click here. Otherwise, go back and try again.

Help me
for Change password use this cod ?

UPDATE mybb_users SET password = '098f6bcd4621d373cade4e832627b4f6', salt = '' WHERE uid = 'X'

X For Me is 1

But my password [test] not Change
please


RE: [Tutorial] Common SQL queries and how to run them - Goggalor - 2012-02-07

Is there a query I can run to delete all pm's from a specific member?


RE: [Tutorial] Common SQL queries and how to run them - Paul H. - 2012-02-07

DELETE FROM mybb_privatemessages WHERE fromid='uid'



RE: [Tutorial] Common SQL queries and how to run them - Goggalor - 2012-02-07

Thanks Paul!


RE: [Tutorial] Common SQL queries and how to run them - FB92 - 2012-02-19

Nice tips though noticed one thing:

Quote:Also notice that with these 2 example, the layout is different. One has and ' with spaces between each bit, and one doesn't. Generally speaking, either style will work, but watch out; if you use the first way, you must make sure you [b]sue the correct[/b] or '. Database tables or column names must have a `, and the information that is to be changed must have a '. SQL query functions are case in- sensetive, so using UPDATE/update, SET/set, WHERE/where will still work fine, whether it's in capitals or not.

You have to sue it? Toungue


RE: [Tutorial] Common SQL queries and how to run them - winds - 2012-04-22

Is it possible to add to an existing column?

For example if I have a table named Points, and within that table I have a column named Points2

If there were 2 rows in that table, row 1 had 100 for Points2 column, and row 2 had 200 for the Points2 column, is it possible to add 100 to each, so that row 1 would now have 200, and row 2 would have 300?

Also is it possible to prune stuff too?
If one column is used for dates, is it possible to prune from a certain date to another date?

Cheers!


RE: [Tutorial] Common SQL queries and how to run them - vsinferno - 2013-01-06

How do i run this on the admin cp.