With the following code i try 2 get the awards out of the database, when i have one award like this one:
awardsid=19 and aw=19 then it shows it on the postbit
now when i add a second award with these variables:
awardsid=16 and aw=0 then nothing will be showed, the first award will be ignored
when i change the second award to awardsid=16 and aw=16 then it shows that second award on the postbit...
so when i add a second award then it fully ignores the first entry/award :noid:
Does someone have a solution for this problem because i get paranoid
I'm using this code:
PHP Code:
if ($post[award]=="1")
{
$awards=$DB_site->query("SELECT aw,awardsid,name, url FROM award");
while ($award=$DB_site->fetch_array($awards)) {
if ($award[aw] == $award[awardsid]) {
eval("\$post[hasaward] = \"".gettemplate("awards")."\";");
}
else {
$post[hasaward]="nope";
}
}
}