Date: 10/15/01
- Next message: Emile Bosch: "[PHP] Re: dlls"
- Previous message: Philip Olson: "Re: [PHP]Only 1 Query Result...help."
- In reply to: Boget, Chris: "[PHP] Some kind of checksum"
- Next in thread: Mike Eheler: "Re: [PHP] Some kind of checksum"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
jup, for message digest check use MD5.. (its a message digest) it translates
any text string into an 32 alphanumeric
string.. so add an exttra field in ur table, named hash or md5 and when u
upload the file md5 the content first, save the md5 hash returned in the
extra field, so u can validate em next time, someone tries to insert a
textfile in the db
warm regards
mielz
"Chris Boget" <Chris.Boget <email protected>> schreef in bericht
news:4040BBE81A9AD411BD27009027887A7C042F57 <email protected>
> I'm using MySQL and that is the context with which I write
> this email.
>
> I have a buch of text files that I want to add to a database so
> we can add all kinds of search functionality for those files.
> Each would be stored in either a TEXT or BLOB field. These
> files can have all kinds of special characters ( ", ', etc) so it
> would be necessary that I use addslashes().
>
> What I would like to do is make it so that I can check to see if
> the file has already been added to the database. I'm having a
> problem where if the text is too large, I can't query to see if the
> contents of the current file equals the contents of the field I'm
> storing it in. Is there any way that I can do some kind of
> checksum on both the contents of the file and the contents of
> the field to determine if that file has already been added? I'm
> trying to make it so that I don't have duplicate files in the DB.
> Has anyone done something like this?
>
> Chris
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Emile Bosch: "[PHP] Re: dlls"
- Previous message: Philip Olson: "Re: [PHP]Only 1 Query Result...help."
- In reply to: Boget, Chris: "[PHP] Some kind of checksum"
- Next in thread: Mike Eheler: "Re: [PHP] Some kind of checksum"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

