List:General Discussion« Previous MessageNext Message »
From:John Date:June 15 2004 2:32pm
Subject:Re: MySQL GROUP, ORDER problem.
View as plain text  
>John:
>
>A couple of suggestions. First, a better way to identify duplicate files
> in to
>use MD5 sum - MySQL can compute it with MD5(LOAD_FILE(fname)) if the file
> is
>residing on the server. It would be a good idea to store the md5 sum in
> the table.
>
>I think your problem can be solved with
>
>CREATE TEMPORARY TABLE t1 (<put select fields here>,UNIQUE KEY(size))
>
>then
>
>INSERT IGNORE INTO t1 SELECT ... ORDER BY
> size,if(ServerName='primary_server',0,1)
>
>and then
>
>SELECT * FROM t1
>
>DROP TABLE t1
>
>A little convoluted, but nothing better really comes to my mind at this
> point.
>
>
>
>
>
>--
>Sasha Pachev
>Create online surveys at http://www.surveyz.com/
>

Yes, this method is not good but i dont have realy access to files only
via ftp. Also i don't know if i have 500+ records and i sorted for 40
records per page. But this method is the only way that i know now.

Regards,
John
Thread
MySQL GROUP, ORDER problem.John14 Jun
  • Re: MySQL GROUP, ORDER problem.Sasha Pachev14 Jun
    • Re: MySQL GROUP, ORDER problem.John15 Jun