mysql - How to design table schema for storing values from <select multiple> -


i have select-multiple list html control, enables end user select multiple items. currently, stored user selected values "truck, heavy truck, others" mysql varchar field. both truck , heavy truck searched out if user select truck on select multiple control. sql statement query "select trucktype table tracktype '%truck%'".

seems way solution put selected values table.

is there other way handle issue in 1 table?

add , end , start

so value becomes , truck, heavy truck, others,

use query

select trucktype table tracktype '%, truck,% 

note: , in like '%, truck,%'


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -