Jump to content

Less than but within 5?


TEENFRONT

Recommended Posts

Hey all

 

Quick help required, probly really easy... Im doing a traffic exchange system for one of my sites and i need to select partners urls that have less "out" hits than they do "in" hits. I track hits elsewhere. The main issue is i want to do the selecting "within" 5 hits.

 

So if site 1 has 15 in and 16 out, i still want to send another hit to this site, as its within "5".

if site 2 has 20 hits in and 24 hits out, this is ok.

if site 3 has 20 hits in and 26 hits out, this is not ok (because in is over 5 from out) and doesnt want selecting.

 

 

The code i have at the moment just selects sites that have a less out than in value.

 

$sql = "SELECT * FROM links WHERE `out` < `in` LIMIT 1";

 

So thats too simple, i want to still select sites that out is within 5 more of in.

 

More than confused.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.