Can you provide structure of your table and possibly a visual representation of your table relationships so I can understand it more clearly.
I have been a website developer for more than 6 years, previously working for a private company making administrative website and developer tools. I work with websites built with PHP, MySQL, Javascript, Wordpress, Laravel and more.
Please feel free to send me a message so we can discuss further details. Thanks.