comma separated value separation

后端 未结 4 1116
长发绾君心
长发绾君心 2021-02-06 11:47

I have one table with the following kinds of records in it. I have Salesman and associated account numbers (comma separated).

+----------+----------         


        
4条回答
  •  臣服心动
    2021-02-06 12:45

    Well it's a very hard thing to do.

    I'll assume you're normalizing your database. If not, you really should.

    If I were you, I'd write a script to normalize the table. Next is a sample in php (it may contain errors):

    Acct);
      foreach ($values as $value) {
        mysql_query("INSERT INTO new_table (Salesman, Acct) VALUES ('$obj->Salesman', $value)");
      }
    }
    ?>
    

提交回复
热议问题