The problem I have is with wordpress custom fields.
I've got wp_postmeta table with post_id, meta_key and meta_value fields.
I would like to echo a sum of meta_values of meta_key 'profit' but only between two dates that are stored as meta_values of meta_key 'start'. Those dates are stored in form of 20140715
Someone please help!