Re: [PHP] printing a one-to-many relationship

2007-04-25 Thread Richard Lynch
$last_entry = 'an extremely unlikely entry'; while (list($entry, $note) = mysql_fetch_row($entries)){ if ($entry != $last_entry){ echo $entry; $last_entry = $entry; } echo $note; } On Wed, April 25, 2007 1:35 pm, Thufir wrote: > There's a one-to-many relationship between px_items.i

Re: [PHP] printing a one-to-many relationship

2007-04-25 Thread Jim Lucas
give this a shot items and notes {$title}"; } echo"  {$id} - {$content} - {$timestamp} - {$notes} - ". "{$link}"; }//while ?> This should do the trick -- Enjoy, Jim Lucas Different eyes see different things. Different hearts beat on different strings.

[PHP] printing a one-to-many relationship

2007-04-25 Thread Thufir
There's a one-to-many relationship between px_items.id and contacts.id, and I want a printout of some data from each. I want to print out the query results px_items.id field once and once only, but the contacts.notes field many times, as there could be many entries. Right now it prints out each r