PrimeSuspect Posted May 28, 2011 Posted May 28, 2011 i want to show crime succes rate in crime page.How i do that ? Quote
W3Theory || Peter Posted May 28, 2011 Posted May 28, 2011 If this is based off of McCodes, then doesn't the criminal table in the database have the formula already in there? Then all you would have to do is $rate = formula with the level being $ir['level'] and just replacing the necessary variables. Hard to say, as I don't know what you are using as your formula. Quote
lucky3809 Posted May 28, 2011 Posted May 28, 2011 (edited) echo your formula... You need to select crimePERCFORM in a query then echo that field... That field is in the crimes table.. Edited May 28, 2011 by lucky3809 Quote
PrimeSuspect Posted May 28, 2011 Author Posted May 28, 2011 echo your formula... You need to select crimePERCFORM in a query then echo that field... That field is in the crimes table.. if i echo crimePERCFORM fields its shown like ((WILL*5)/2)+(LEVEL/2) Also every single formula is different.. For example 1.Crime's formula ; ((WILL*7)/3)+(LEVEL/2) 2.Crime's formula ((WILL*4)/2)+(LEVEL/3) bla bla bla... Quote
lucky3809 Posted May 28, 2011 Posted May 28, 2011 (edited) There is a way of doing it, maybe add them like $crime1=$ir['will']*5/2+$ir['level']/2; $crime 2=crime2 formula... and so on... then echo them llike echo ' '.$crime1.' '; put them by the corresponding crime that they go to...it should calculate it for you the math and echo the outcome. Edited May 28, 2011 by lucky3809 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.