Hello and thanks for any help with this, I thought this would be simple but it has eluded me for several hours now...:eek:
So I track banner clicks and showss using a table called banners in my db.
I had an idea to also display a click through ratio if the clicks was greater than zero of course ;-) i.e. shows / clicks which is the click through ratio for the given shows.
So now the problem all that was very easy to do but now I want to make the ratio text where I display the ratios clickable to the user and for this to order the output by ratio which is not a real table in the db.
So I have the following and I've tried many different variations with no success yet.
$sql = "SELECT * FROM `Banners` WHERE (Clicks, '/ ',Shows ) AS `ratio` and Clicks != 0 ORDER BY `ratio` DESC";
I'm also not sure this will create the ratio but I've tried several vesions of it as well (Clicks, '/ ',Shows )....
So far all I get is a failed MySQL Syntax errors
Any help would be great
basically clicks and shows are INT fields in the Table Banners