Then when checking to see if the user has a valid subscription I simply “select * from my_table where user_id = 1 AND expiry_date > “.time() — with time() being the regular php function. This way I can pull back all the valid subscriptions that a user has and see which has the highest/lowest amount of access to the product.
It’s useful to do it this way because it enables users to upgrade/downgrade and I can get their subscription levels with just one query – yet they can be running multiple subscriptions at any given time.
Hope this makes sense!!
]]>