[Tutorial] Common SQL queries and how to run them
This user has been denied support. This user has been denied support.
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?
Yes, it is right.

I recommend backing up your mybb_threads table first though, just in case something goes wrong.
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?
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 :

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

Is there a query I can run to delete all pm's from a specific member?
DELETE FROM mybb_privatemessages WHERE fromid='uid'
-Paul H.

Cogisne lingua latina?
Thanks Paul!
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
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?

How do i run this on the admin cp.

Forum Jump:

Users browsing this thread: 1 Guest(s)