logs archiveIRC Archive / Freenode / #php / 2015 / June / 28 / 1
Sayona
ahhh
same to work
let me do something
runinsquares
http://dpaste.com/2SYRAG6
that seem to do the trick?
__adrian
the thing tripping you up here it that you are giving a total to people that don't _have_ totals.
i.e., in a race, a time of 00:00:00 means they finsihed the race in _less than one second_, not that they _never finished_.
Sayona
look
http://89.40.28.19/stafeta/?page=ranking/orienteering&category_id=4
is oki
__adrian
you're skipping the "" totals?
Sayona
i add time on 00:00:00
there was the problem
i need to add something if get 00:00:00 to continue
__adrian
right.
runinsquares
he has an abandon flag
isn't that for non-finisher?
__adrian
true. Sayona, you could use [abandon] to decide whether to check your times.
         

Sayona
runinsquares yes
how I display in my smarty that
becouse connot get
__adrian
smarty? don't know. /join #smarty
Sayona
I will find
how I add to decide based on abandon?
runinsquares
you had an abandon flag somewhere, i saw it
__adrian
if( abandoned ){ skip }
Sayona
http://www.pastebin.ca/3038788
__adrian
probably something like if( $row['abandoned'] ){ continue; }
runinsquares
orienteering.abandon
if it's a mysql ASSOC
then it'd just be abandon
Sayona
yes
if( $orientare['abandon'] == 1 ){ continue; }
runinsquares
that's that idea
except
what does 1 mean?
it's boolean yeah?
if abandon=1, i'd assume that means they abandoned the race
Sayona
1 if is abandoon
runinsquares
right
so think about what your statement does
since it's boolean you can reduce the code down to a simple if () as these are true/false
therefore
Sayona
pff
get null
if( $orientare['abandon'] == 1 ){ continue; }
runinsquares
if (!$orientare['abandon']) {}
Sayona, your statement interprets to "if they left the race, continue"
you want the opposite
Sayona
if (!$orientare['abandon']) {}
__adrian
no, that's what she wants.
Sayona
and i add the code from __adrian in {} ?
__adrian
skip if they did not finish the race
Sayona
yes
skip
__adrian
Sayona, you'd add it at the beginning of the loop.
         

runinsquares
ah you're referring to continue in the loop, my bad, i was reading it like pseudo code!
__adrian
:)
runinsquares
that works too xd
Sayona
with if( $orientare['abandon'] == 1 ){ continue; } give me null
__adrian
imagine if code worked literally.. we'd have to put continue; after _every_ statement
:p
runinsquares
make a new paste with your added code
__adrian
i gotta run. be back later.
Sayona
__adrian|away see ya
runinsquares, http://www.pastebin.ca/3038794
look runinsquares http://89.40.28.19/stafeta/?page=ranking/orienteering&category_id=4
runinsquares
Sayona,
Sayona
no know why create so many array
runinsquares
directly after:
foreach( $orienteering as $orientare ){
if ($orientare['abandon']) { continue; }
Sayona
there are 5 teams
runinsquares
delete line 31
replace line 28
Sayona
done
runinsquares
this is saying, if abandon == 1, skip to next loop
Sayona
thanks
runinsquares is correctly to display me link that
http://89.40.28.19/stafeta/?page=ranking/orienteering&category_id=4
the array ?
same to be more array
SuperTyp
what is better? checking the pathino_extension with pathinfo or the mime type of a file?
Sayona
runinsquares with score...
runinsquares
Sayona, your array is appending. it is going: 0... 0,1... 0,1,2... 0,1,2,3
Sayona
now? is oki
runinsquares
Sayona, lines 59 to 61 should be after line 63 (outside of loop)
yeah see it's just showing the final array now
Sayona
:*
pentagrass
:o
Sayona
runinsquares, http://89.40.28.19/stafeta/?page=ranking/orienteering&category_id=4
stupid smarty...
5000 4940 4727 4700
give me
runinsquares
i can't give input on what you should do without seeing more of the code unfortunately
Gevox
SuperTyp: what you trying to do?
Sayona
is a smarty stuff
runinsquares
it might be a question for #smarty
Sayona
Gevox hanks
yes
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 next »