You are here: Re: A Question of design. « PHP Programming Language « IT news, forums, messages
Re: A Question of design.

Posted by Rik on 10/24/06 15:06

Daz wrote:
>> So, validate the names. Then use Chung's process for updating your
>> table with the ones which are valid.
>
> Hi Jerry.
>
> Thanks for that.
>
> This brings be back to my original question.
>
> Is the best way to validate the names, by having the db names in one
> array, and the users books in another, and iterating through the users
> array using in_array() to check if it's a valid book in the db array.

Create an array of what to add, capture all existing items in another array
, then it's a simple question of array_diff() for items that are invalid.

Then create an array of already owned items, array_intersect() will tell
you what to update, the rest will have to be added.
--
Grtz

Rik Wasmus

 

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

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