• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
join problem..?

#8
[eluser]sl3dg3hamm3r[/eluser]
[quote author="amira_fcis" date="1258553511"]coz i did my best but i couldn't reach my target result[/quote]

And what did you do until now?

Code:
$tmpName = "";
foreach ($query->result() as $row)
{
  if ($tmpName != $row->Name) {
    echo $row->Name . " " . $row->Value;
    $tmpName = $row->Name;
  } else
    echo $row->Value;
}
This is some untested code. It implies that you have 'Name' and 'Value' in your result-set.


Messages In This Thread
join problem..? - by El Forum - 11-17-2009, 09:59 AM
join problem..? - by El Forum - 11-17-2009, 10:08 AM
join problem..? - by El Forum - 11-17-2009, 10:19 AM
join problem..? - by El Forum - 11-17-2009, 10:23 AM
join problem..? - by El Forum - 11-17-2009, 10:26 AM
join problem..? - by El Forum - 11-17-2009, 10:27 AM
join problem..? - by El Forum - 11-18-2009, 02:11 AM
join problem..? - by El Forum - 11-18-2009, 02:19 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.