RE: where match question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, January 23, 2007 11:49 pm, Don wrote:
> I appreciate all the input. I would definitely like to use a separate
> table
> for the zips, but I cannot figure out how make the form that stores
> them
> user friendly.... each entry can have any number of zips - from many
> to just
> a few.
>
> Also, the site is in development, so there is no existing data....
>
> I will play with LIKE for the time being.....

You could keep the FORM the same, but use http://php.net/explode to
put separate records into the database, and http://php.net/implode to
show the zips in the FORM.

Depending on the application, you may want to have separate INPUT
fields for pre-existing zips in the DB, with no implode, and only a
big-ass INPUT for NEW zips with commas to go into the DB.

It's also possible to play games with CSS and/or JS and extra INPUT
fields to have the number of available INPUT fields be dynamic as they
add more and more zips in the browser.

YMMV

It's probably best to stop and think about what's the BEST way for
people to do this task, the best business process, and then ask how to
achieve that, rather than pushing the Design to match your (current)
PHP limitations. :-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux