MySQL: Query Cacheing (How do I use memcache?)

Posted by Rachel on Stack Overflow See other posts from Stack Overflow or by Rachel
Published on 2010-04-02T18:04:26Z Indexed on 2010/04/02 18:43 UTC
Read the original article Hit count: 144

Filed under:
|

I have an query like:

SELECT id as OfferId FROM offers
WHERE concat(partycode, connectioncode) = ? 
AND CURDATE() BETWEEN offer_start_date 
AND offer_end_date AND id IN ("121211, 123341,151512,5145626 ");

Now I want to cache the results of this query using memcache and so my question is

  1. How can I cache an query using memcache.
  2. I am currently using CURDATE() which cannot be used if we want to implement caching and so how can I get current date functionality without using CURDATE() function ?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about sql