PEAK XOOPS - D3Pipes and more - database reduction by entry size in englishin japanese

D3Pipes and more - database reduction by entry size

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2007/12/8 1:55
Nobelium  ¸àĹ   Posts: 47
GIJOE,

I've looked around and can't find a simple answer to this problem:

I want to cull a d3pipe database of all entries that are smaller than x (say 1k).

I have myphpadmin and was trying to use SELECT, (or even sort for that matter - but it won't sort that way), by the data row/field (DATA) size. That way I could select and delete all entries that were very small in size.

Some data feeds haves items that are very small, especially those regarding dates and figures being updated. So, I have hundreds of very small entries that I'd like to clear out that the clipping (delete by date) function can't do.

If you have time, could you possibly post a mysql SELECT Query that would search that data field and return entries smaller than say 1k in characters (or bytes or something)??

As for making this a feature in D3Pipes, I don't know how many others could use this functionality within the clippings utility tab, but some I'm sure...

Much thanks.

n
Votes:18 Average:8.89
Previous post - Next post | Parent - No child | Posted on 2007/12/13 5:44 | Last modified
GIJOE  ÀèǤ·³Áâ   Posts: 4110
Do you want to know how to delete entries smaller than 1k from clipping table?

Then, this SQL will help you.

DELETE FROM (prefix)_(dirname)_clippings WHERE LENGTH(data) < 1024;

Of couser, you'd better query "SELECT" for confirming before "DELETE".

SELECT COUNT(*) FROM (prefix)_(dirname)_clippings WHERE LENGTH(data) < 1024;
Votes:4 Average:10.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!