Yea, for my purposes, I think an md5 of only the $sql would do.

Thanks,
Paras

On Apr 15, 11:38 pm, Toru Maesaka <[email protected]> wrote:
> You're creating a hash value with the MD5 algorithm. Not sure why it's
> prefixing with 'query' since that's not really namespacing anything
> (afraid of collision perhaps?).
>
> http://php.net/md5
>
> Toru
>
>
>
> On Thu, Apr 16, 2009 at 12:28 PM, Paras <[email protected]> wrote:
>
> > I found a sample code online which showed me how I can use memcached
> > with php. Here is the code.
>
> > //write query
> > $sql = "select * from pages where page_id=1";
>
> > //create an index key for memcache
> > $key = md5('query'.$sql);
>
> > Can anyone tell me what the line after the second comment means ?
>
> > Thanks,
> > Paras

Reply via email to