Welcome, Guest. Please Login or Register.
November 27, 2024, 08:49:50 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  English User Help  |  English Help  |  Sql Help And Problem « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Sql Help And Problem  (Read 324 times)
dumbfatguy
Noobie
*
Posts: 40


Inspiration moves me brightly

Sql Help And Problem
« on: May 25, 2003, 07:07:06 PM »
Reply with quote

I need some help with SQL
For some "dumb reason" I wasn't aware you could delete attachements out of the attachment manager. So I went Into my FTP and deleted all the attachments before JAN 1 2003, So even though the files are not there there Are still in mySQL data base. In the attachment size and attachment name fields, there for screwing up my attachment manager.
So I'm sure there Is a way I could "purge" just they entries for Attachment size and Attachment file name for before Jan 1 2003 but I am not sure what the syntax would be.

Also I want just to clear out those Fields and not all the messages.

I hope this makes sense and someone can help me out a little bit, thanks for your time.
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Sql Help And Problem
« Reply #1 on: May 25, 2003, 10:32:16 PM »
Reply with quote

UPDATE yabbse_messages
SET attachmentFilename = NULL, attachmentSize = 0
WHERE posterTime <= UNIX_TIMESTAMP('2003-01-01');

Should work.

-[Unknown]
Logged
dumbfatguy
Noobie
*
Posts: 40


Inspiration moves me brightly

Re:Sql Help And Problem
« Reply #2 on: May 25, 2003, 11:02:24 PM »
Reply with quote

Sweet that worked like a charm, thank very much
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  Sql Help And Problem « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.044 seconds with 21 queries.