PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$vault['success'] = mysql_result(mysql_query('SELECT count(0) FROM `logs_vault` WHERE `uID` = '.$uID.' AND `vResult` = 1'), 0);
<td>if the users successful count is 3 or higher, then show oc2.png otherwise show oc1.png</td>
also... where would i put the top piece of info? thanks everyone
$player['vResult'] = mysql_result(mysql_query('SELECT count(0) FROM `logs_vault` WHERE `uID` = '.$_GET['id']), 0);
OR
$player['vResult'] = mysql_result(mysql_query('SELECT count(0) FROM `logs_vault` WHERE `uID` = '.$uID.' AND `vResult` = 1'), 0);
but neither work properly tho...
i want it to count how many 1's each player has... if over 3 then change the image... right now i dunno what it's doing.. some players it shows correctly - other players it doesn't - in the database there is only 3 entries in logs_vault with vResult being 1
me
another player (2x)
so nobody should have oc2.png atm... *depressed* but i do appreciate the help everyone
i don't know what you mean by "create table" - i posted the fields....
Field Type Collation Attributes Null Default Extra Action
uID int(11) UNSIGNED No Browse distinct values Change Drop Primary Unique Index Fulltext
vTime int(11) UNSIGNED No Browse distinct values Change Drop Primary Unique Index Fulltext
vResult tinyint(1) UNSIGNED No Browse distinct values Change Drop Primary Unique Index Fulltext
vGuess char(5) latin1_swedish_ci No Browse distinct values Change Drop Primary Unique Index Fulltext
vCash int(10) UNSIGNED No Browse distinct values Change Drop Primary Unique Index Fulltext
vBullets int(10) UNSIGNED No Browse distinct values Change Drop Primary Unique Index Fulltext
what i would like to do is query FROM `logs_vault` WHERE `uID` has 1's in the vResult - if uID has 3 or more 1's then change the pic from oc1.png to oc2.png
how would i go about doing more pictures in the same td.. like 5 or more with different instances? the td is very wide and a few 32x32 images will fit.. it's like award pics for various successes in the game.