Welcome Guest, Not a member yet? Register   Sign In
Excel(csv) import with simple validation

Hello Friends,
I have a product table called t_product
having just 4 fields
1. id (ai)
2. poroduct
3. generic_name
4. description
5. status
I have to populate this table from excel file.
I can easily import the file no issue but i have to check if a particular product exist it should not be imported at all.
How can i do that just share the logic (good if you have a code for it) should i import the data from excel to a temporary table and then do the checking or is it possible to import and validate simultaniously
Please Help

(This post was last modified: 03-09-2017, 06:48 AM by AzrielOmega.)

Load into an array and use foreach and if else to check

I found this mySQL solution, only need to convert to CI query builder

or this

I use this all the time:

It's been perfect for me.

Theme © iAndrew 2016 - Forum software by © MyBB