Drupal 6 Custom Code Fix

Befejezett Kiadva: Oct 30, 2013 Kiszállításkor fizetve
Befejezett Kiszállításkor fizetve

I need a Drupal 6 code fixed ASAP.

The basics behind the custom code are finding a score for a player based off of their fitness test results.

I believe that the problem comes with finding the rank of players in a function (below)

function rankByCriteria($criteria,$uid,$userCriteria,$allnid,$order)

{

$i=1;

$rank=0;

if($userCriteria=='0.00' || $userCriteria=='NULL')

{

$rank=0;

}

else

{

$allTestNids=implode(',',$allnid);

$criteriaRankQry=mysql_query("select * from content_type_test where nid in($allTestNids) and $criteria!='NULL' and $criteria!='0.00' order by $criteria $order")or die('rank by criteria issue');

while($criteriaRankRow=mysql_fetch_array($criteriaRankQry))

{

if($criteriaRankRow['field_player_uid']==$uid and $criteriaRankRow[$criteria]==$userCriteria)

{

$rank=$i;

}

$i++;

}

}

return $rank;

}

Here is what the function is supposed to do

1) Search a table in the database for all records that have the same training_camp_nid, are not empty and are not 0.00

2) Sort the data based on a specified criteria ($criteria) and order ($order)

3) Find the rank of a specific test result based on the current logged in user's ID.

Right now it is not finding this rank correctly. For example a player has a speed result that should rank him 13th but it is ranking him 23rd which is the total amount results found.

Need this fixed right away I have attached the actual file so you can look at it. I am available at all hours to chat. If you feel that he code needs to be completely re-written that is fine I just want it done right and fast.

Drupal MySQL PHP

Projektazonosító: #5078600

A projektről

4 ajánlat Távolról teljesíthető projekt Utoljára aktív: Oct 30, 2013

Odaítélve:

ErwanMas

Hello , I am a senior in developpment , perl , php javascript . I am a senior in administration of linux systems and sql database . I can help to fix your problem .

$126 USD 2 napon belül
(6 értékelés)
3.1

4 szabadúszó tett átlagosan 167$ összegű árajánlatot erre a munkára

coolguyinus2004

PHP/MYSQL programmer here. the fix for this is not complete rewritten what i will do is check the query and the output it generates and then will ask you wahts correct rank etc then i will see options to get the answer Továbbiak

$155 USD 3 napon belül
(286 vélemény)
7.4
drupaldelhi

This is my job. I have 5+ years of experience in drupal. I have worked on drupal 6 and drupal 7 modules. I would like to have access of the site to fix the issue.

$222 USD 3 napon belül
(45 vélemény)
5.8
pcofilada

Greetings, I can do this for you and I can make this AWESOME. I will also provide 1 month FREE support for this. Thank you and hope to work with you.

$166 USD 1 napon belül
(0 vélemény)
0.0