List from database doesn't display properly
Posted: Mon Apr 19, 2004 5:01 pm
If i retreive info from my database, it looks like this:

In the last colomn there only should be 'Jaar: 2'
In the 2nd colomn there only should be 'Jaar: 4'
and in the First colomn there only should be 'Jaar: 1'
This is the code that is use, It is a Mod for invision boards. But the as you can see in the image above, the list is not displayed properly. And i can't figure out what to change!?
What do I have to change to let the list display properly?

In the last colomn there only should be 'Jaar: 2'
In the 2nd colomn there only should be 'Jaar: 4'
and in the First colomn there only should be 'Jaar: 1'
This is the code that is use, It is a Mod for invision boards. But the as you can see in the image above, the list is not displayed properly. And i can't figure out what to change!?
Code: Select all
1) First sources/Admin/ad_member.php and find:
-------------------------------------------
$ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'domod' ),
2 => array( 'act' , 'mem' ),
) );
-------------------------------------------
Add above, this:
-------------------------------------------
//Start Pfields mod
$numrows=mysql_query("SELECT `fid` FROM `ibf_pfields_data` where 1");
$numfields = mysql_num_rows($numrows);
//MOD END
--------------------------------------------
¤) Find:
-------------------------------------------
$SKIN->td_headerї] = array( "Age" , "10%" );
-------------------------------------------
Replace with, this:
-------------------------------------------
$SKIN->td_headerї] = array( "Pfields" , "10%" );
--------------------------------------------
¤) Find:
-------------------------------------------
$DB->query("SELECT m.name, m.id, m.email, m.posts, m.joined, v.*
FROM ibf_validating v
LEFT JOIN ibf_members m ON (v.member_id=m.id)
-------------------------------------------
Replace with, this:
-------------------------------------------
//Start Pfields mod
$DB->query("SELECT p.fid, p.ftitle
FROM ibf_pfields_data p
WHERE 1");
$i=1;
while ( $pfd = $DB->fetch_row() )
{$fieldnameї$i]=$pfdї'ftitle'];$i++;}
for ($i = 1; $i <= $numfields; $i++) {
$fields .="c.Field_".$i.",";
}
//MOD END
$DB->query("SELECT c.member_id,$fields m.name, m.id, m.email, m.posts, m.joined, v.*
FROM ibf_validating v
LEFT JOIN ibf_members m ON (v.member_id=m.id)
LEFT JOIN ibf_pfields_content c ON (m.id=c.member_id)
--------------------------------------------
¤) Find the /SECOND/ occurrence of:
-------------------------------------------
LEFT JOIN ibf_members m ON (v.member_id=m.id)
-------------------------------------------
Add under, this:
-------------------------------------------
LEFT JOIN ibf_pfields_content c ON (m.id=c.member_id)
--------------------------------------------
¤) Find:
-------------------------------------------
$ADMIN->html .= $SKIN->add_td_row( array( "<b>".$rї'name']."</b>$coppa" ,
-------------------------------------------
Add above, this:
-------------------------------------------
//Start Pfields mod
for ($i = 1; $i <= $numfields; $i++) {
$fld="Field_".$i;
if ($rї$fld] != "") {$pfieldata .= "<center>$fieldnameї$i]: $rї$fld]</center>";
if ($i != $numfields)
{$pfieldata .="<br>";}}
}
//MOD END
--------------------------------------------
¤) Find:
-------------------------------------------
"<center><strong><span style='color:red'>$days d</span>, $rhours h</center>",
-------------------------------------------
Replace with, this:
-------------------------------------------
$pfieldata,