PHP MySQL : Load data infile add row index base on primary key -


i uploading csv file using load data infile, how can make row index specific column.

$max_asset_id = 79;  load data local infile '$file' ignore table asset_mgt.asset_info fields terminated ',' enclosed '\"'  lines terminated '\n' (@asset_id, @type_of_asset, @asset_description, @model, @serial_number, @asset_tagging_no, @quanity, @remarks) set asset_id = /*add increment here $max_asset_id++ */, type_of_asset = @type_of_asset, asset_description = @asset_description, model = @model, serial_number = @serial_number, asset_tagging_no = @asset_tagging_no, quanity = @quanity, remarks = @remarks 


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -