|
Posted by Daz on 10/24/06 11:36
> 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.
Or would it be better to put all of the database items into a comma
separated string, and then iterate through the user array using
preg_match() or maybe even strtr().
Perhaps the difference is negligable. But that is what I'd like to find
out. If it's something that no-one knows the answer to, I am happy to
set up a test, but I didn't see any point in 'reinventing the wheel' so
to speak, if someone already knew the answer.
Many thanks for your input.
Daz.
[Back to original message]
|