Drupal 6 Custom Code Fix

Đã hoàn thành Đã đăng vào Oct 30, 2013 Thanh toán khi bàn giao
Đã hoàn thành Thanh toán khi bàn giao

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

ID dự án: #5078600

Về dự án

4 đề xuất Dự án từ xa Oct 30, 2013 đang mở

Được trao cho:

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 trong 2 ngày
(6 Đánh Giá)
3.1

4 freelancer chào giá trung bình$167 cho công việc này

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 Thêm

$155 USD trong 3 ngày
(286 Nhận xét)
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 trong 3 ngày
(45 Nhận xét)
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 trong 1 ngày
(0 Nhận xét)
0.0