HTML form input field with comma separated

前端 未结 4 1237
梦毁少年i
梦毁少年i 2021-01-23 22:38

I am trying to figure out how to take multiple word input in a single text box in a form with each word separated by comma(,) and then paring the word based on comma and inserti

4条回答
  •  庸人自扰
    2021-01-23 23:26

    If you need to encapsulate the words in quotes, this should do the trick:

    
    

    Output:

    insert into table1 (columnName) values (('sometext'),('someothertext'),('and something else')) 
    

    This will insert multiple records in proper accordance with the mysql insert multiple values syntax.

提交回复
热议问题