The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need help with an SQL Query
I need a query that I can execute so that I can turn "SHOW SIGNATURES" on for a certain user. You know how when you make a post and you have the option to "Show your Signature". Well if a user never created a signature from the day he signed up and then all the sudden creates one, that signature will not show up for all his past posts but only his future ones. So I need to create a query so that I can SELECT all the posts made from a certain user from the POST table and then execute another query to change the "showsignature" field from 0 to 1
EXAMPLE: If I execute this query UPDATE post SET showsignature = 1 it will enable show signatures on every user that has made a post. So I was thinking that I need to run another query before that but I am having some trouble with the syntax. Here's what I got so far... SELECT BillGates FROM `myforum`.`post`.`username` But that syntax is obviously incorrect. So if any help would be appreciated :up: |
#2
|
|||
|
|||
This will update every post that BillGates has done where the signature is missing.
Code:
UPDATE `myforum`.`post` SET `showsignature` = '1' WHERE `post`.`username` ='BillGates' AND `showsignature`= '0' HTH |
#3
|
|||
|
|||
And that Michael is why YOU'RE THE MAN
Thanks worked PERFECT! :up: |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|