You are here: Re: Linking multiple records from another table « PHP Programming Language « IT news, forums, messages
Re: Linking multiple records from another table

Posted by Tony Marston on 02/24/06 01:51

What you are describing is a classic "many-to-many" relationship. Take a
look at http://www.tonymarston.net/php-mysql/many-to-many.html for details.

--
Tony Marston
http://www.tonymarston.net

"Dale" <dale.drinkard@gmail.com> wrote in message
news:1140703564.436036.79490@e56g2000cwe.googlegroups.com...
> I'm not sure I'm even thinking about this the right way, but here goes:
>
> I have a table of users. Each one of these users may be associated
> with none, one, or many records in another table I call a todo table.
> table user = 'id', 'name', 'bla bla bla','todo_list'
> table todo = 'id','title','other info'
>
> Suppose user 'id=1253' has on his todo list items 756,241, and 672. I
> create a string 756,241,672 and store that string in the user's
> todo_list field. Then when I want to display the todo items I get the
> string with a query, bust it up into an array, iterate the array and
> query the todo table.
>
> I have a gut feeling I'm making it way more complicated than need be.
> But I can't think of any other way to do it
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация