Jump to content

[SOLVED] Sorry for all my posts, but I need help again!


TimUSA

Recommended Posts

Sorry for all my posts, but I need help again! I am a rookie!

 

I now have a table that looks like this:

  raceID  memberName  raceDate    factor  racePoints  matchPoints  fleetPoints 

              1      Arione          2007-12-29  2        0.75          NULL            1.50

              2      Biscia            2007-12-29  2        2.00          NULL            4.00

              3      artwales        2007-12-29  2        0.00          NULL            0.00

              4      Arione          2007-12-29  2        0.75          NULL            1.50

              5      Biscia            2007-12-29  2        2.00          NULL            4.00

              6      artwales        2007-12-29  2        0.00          NULL            0.00

 

i would like to do something like this:

$nameresult = mysql_query("SELECT `memberName` from `ladder_points` where `membername` = [???where each are the same???] order by `memberName`;

 

any ideas?

 

He is trying to group them.

yep! that may work

 

so am i on the right path here?

 

$nameresult = mysql_query("SELECT `memberName` from `ladder_points` group by `membername` order by `memberName`;
$result=mysql_query($nameresult);
$num=mysql_numrows($result);

$i=0;
while ($i < $num) {
echo $row[0]; //not sure if this is correct
$i++;
}

ok working sort of:

$sql = "SELECT `memberName` , `fleetPoints` from `ladder_points` group by `membername` order by `memberName`;";
$result = mysql_query($sql);
$num = mysql_numrows($result);
$i = 0;
$name = mysql_result($result,$i,"memberName");
$fleetpoints = mysql_result($result,$i,"fleetPoints");

while ($i < $num) {
echo "<b>$name $fleetpoints</b>";
$i++;
}

 

returns this:

alvaritop 16.00alvaritop 16.00alvaritop 16.00alvaritop 16.00

rather than individual results

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.