I am using openads and would like to add a function to it that allows me to target male/female ratio on my site. It is a social networking site and I have the information of male and female when the user is logged in. I would like for advertiser to be able to target users like this: We'll take the example of a skateboard.
company A would like to advertise for their skateboard. Their target is 80% male but would like to advertise to 20% women.

I'm a little lost at how to accomplish this. Openads structure aside how could I accomplish this?

Here is what I was thinking. In the DB I could put 5 rows, male ratio,female ratio, #of male ads served, number of female ads served, and total ads to be served. Then I was thinking that the script would look at the male ratio and female ratio and then look at the # of ads to be served divided respecitivly by the # of male and female ads served then put a check to see if the ratios are ok.

This is how I am thinking of doing it but I would love to hear anyones input on this as I am interested to see if there is a better way