Support Forums
SQL Query help (vbulletin) - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Webmaster Support (https://www.supportforums.net/forumdisplay.php?fid=36)
+---- Forum: Website Development (https://www.supportforums.net/forumdisplay.php?fid=43)
+---- Thread: SQL Query help (vbulletin) (/showthread.php?tid=25245)



SQL Query help (vbulletin) - DAMINK™ - 02-20-2012

I am wanting to run a query to change everyone that has no DOB to a generic type one like 1/1/80 or something?
Anyone know vbulletin and how to create the correct query?
Databases and me are not great friends.
Especially querys.
Easy to execute but hard to write.
Any help would be appreciated.



RE: SQL Query help (vbulletin) - Load - 02-20-2012

Are you running this query within PHPmyAdmin or similar client? If so you can select your users table from the menu, then hit the search tab at the top, in the DOB collum search for blank, then from there you should be able to mass edit them to a generic value.

I could write you a SQL query to run that would do all of this but I don't know how your database is layed out or collum names.

Hope this helps anyway.


RE: SQL Query help (vbulletin) - DAMINK™ - 02-25-2012

Thanks Load. I ended up working out a way to do it.
Problem was i had many users with invalid DOB and it was throwing a small error.
So i just make them all the same DOB lols.
Using the below query.

UPDATE user
SET birthday = '' , birthday='1970-01-01'
WHERE birthday = '--'

Yea for some reason the birthday column had -- as the DOB instead of 0000-00-00 which is default if none is chosen i believe.