Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 13 Jan 2009, 16:22
TruthElixirX's Avatar
TruthElixirX TruthElixirX is offline
 
Join Date: Sep 2004
Deleting Duplicate Threads That Do NOT Share The Same Timestamp

I need to delete some duplicate threads, but they do not have the same time stamp.

I opened up admincp/misc.php and went to:



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


and changed it to (I removed what was colored blue above) :



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


This gets rid of the time stamp requirement, but now, I need to limit it to a specific username/id. How do I do this?
Reply With Quote
  #2  
Old 13 Jan 2009, 16:30
Bellardia Bellardia is offline
 
Join Date: Jul 2007
AND postuserid = $thread[postuserid]
but it's already limited by..
postusername = '" . $db->escape_string($thread['postusername']) . "'
Reply With Quote
  #3  
Old 13 Jan 2009, 16:44
TruthElixirX's Avatar
TruthElixirX TruthElixirX is offline
 
Join Date: Sep 2004
Originally Posted by Bellardia View Post
AND postuserid = $thread[postuserid]
but it's already limited by..
postusername = '" . $db->escape_string($thread['postusername']) . "'
So I would put the username I wish to limit it to in

$thread['postusername']

So it would look like:

$thread['test']

for example?
Reply With Quote
  #4  
Old 13 Jan 2009, 20:54
Bellardia Bellardia is offline
 
Join Date: Jul 2007
$thread['test'] would have no value because there's no column 'test' on the thread database. You could just replace the whole string by
postusername = 'test' but depending on where you run the script it would always delete threads from test even if it was someone else's fault..

Where do you plan on placing this?
Reply With Quote
  #5  
Old 13 Jan 2009, 21:14
TruthElixirX's Avatar
TruthElixirX TruthElixirX is offline
 
Join Date: Sep 2004
Originally Posted by Bellardia View Post
$thread['test'] would have no value because there's no column 'test' on the thread database. You could just replace the whole string by
postusername = 'test' but depending on where you run the script it would always delete threads from test even if it was someone else's fault..

Where do you plan on placing this?
I plan putting it in that section of admincp/misc.php and altering it for this one time use to cull some duplicate content, then reverting back to how it should be.


What do you mean by "would always delete threads from test even if it was someone else's fault." ?
Reply With Quote
  #6  
Old 14 Jan 2009, 00:51
Bellardia Bellardia is offline
 
Join Date: Jul 2007
Well I wasn't sure where you were pulling the code from.
It uses a variable as the username based on the thread that it's being performed on, so if you defined the name explicitly it would only work on threads based on the title of the thread you're using this on made by the user you've defined. Depending on how you do that it could be 0 threads.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 21:30.

Layout Options | Width: Wide Color: