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 - Nathan Malcolm - 2013-01-06

(2013-01-06, 02:46 PM)vsinferno Wrote: How do i run this on the admin cp.

You can't. For security reasons MyBB doesn't have this feature. You'll want to use phpmyadmin or a similar application.


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

(2013-01-06, 02:46 PM)vsinferno Wrote: How do i run this on the admin cp.

If you want to take the risk, here is a plugin you can use.


RE: [Tutorial] Common SQL queries and how to run them - shamzblueworld - 2014-10-15

Thanks for sharing the tut, excellent.


RE: [Tutorial] Common SQL queries and how to run them - [email protected] - 2015-01-18

How can I remove a user group with a sql query as most the buttons in admin cp don't work since I upgraded to 1.8 as ive got a issue where on the group page it shows about 1500 members but there is only just over 800 members on my forum so I'm guessing this is causing the problem of users not importing to vb4 as im in the process of importing my forun to vb4 and then back to mybb 1.6 as 1.8 is rubbish


RE: [Tutorial] Common SQL queries and how to run them - dragonexpert - 2015-01-18

Did you remember to replace all files, including ones in the admin directory when you did the upgrade?


RE: [Tutorial] Common SQL queries and how to run them - Predatorz - 2016-01-29

Hello I recently made a CDN so I wanted to move all my current urls of images on namestyles to the new urls, they all end in the same image number and extension but I wanted to replace example.com/z/imagenumber.imageext to cnd.example.com/i/imagenumber.imageext ...
Could someone give me a hand real quick?
What I tried: UPDATE mybb_usergroups SET namestyle = 'https://cdn.example.com/i/*.*' WHERE namestyle = 'https://example.com/z/*.*'


RE: [Tutorial] Common SQL queries and how to run them - .m. - 2016-01-29

^ what you mean by namestyles image ?


RE: [Tutorial] Common SQL queries and how to run them - Predatorz - 2016-01-29

(2016-01-29, 04:39 AM).m. Wrote: ^ what you mean by namestyles image ?

What I tried: UPDATE mybb_usergroups SET namestyle = 'https://cdn.example.com/i/*.*' WHERE namestyle = 'https://example.com/z/*.*'
This will hopefully help you understand, I have more code before this line such as <img and stuff I ONLY want to replace the url of image


RE: [Tutorial] Common SQL queries and how to run them - .m. - 2016-01-29

^ query similar to below should work
UPDATE `mybb_usergroups` SET `namestyle` = REPLACE(namestyle, 'https://cdn.example.com/i/', 'https://example.com/z/') WHERE `namestyle` LIKE '%https://cdn.example.com/i/%'



RE: [Tutorial] Common SQL queries and how to run them - Predatorz - 2016-01-29

(2016-01-29, 04:48 AM).m. Wrote: ^ query similar to below should work
UPDATE `mybb_usergroups` SET `namestyle` = REPLACE(namestyle, 'https://cdn.example.com/i/', 'https://example.com/z/') WHERE `namestyle` LIKE '%https://cdn.example.com/i/%'

Changed it to:
UPDATE `mybb_usergroups` SET `namestyle` = REPLACE(namestyle, 'https://example.com/z/', 'https://cdn.example.com/i/') WHERE `namestyle` LIKE '%https://example.com/z/%'
Thanks man <3