Jump to content

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


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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.