Women in Technology

Hear us Roar



Article:
  Allowing Registration-Required Binary Downloads
Subject:   It would be better to pre-calculate the md5 hash.
Date:   2006-02-27 09:29:39
From:   phallstrom@gmail.com
SELECT firstname,lastname,email FROM client
WHERE
md5(firstname||lastname||email) = '$str_download'"


---


Is going to be really slow if you've got any significant number of records in that database as you'll have to compute the md5 hash of each triplet everytime.


It would be better to add an "unique_hash" column to your table and do a simple equality comparision on lookup.

Main Topics Newest First

Showing messages 1 through 1 of 1.

  • It would be better to pre-calculate the md5 hash.
    2009-01-10 07:51:07  Jason.Carter [View]

    php (php.net)