I have a MySQl table with large number of columns without a primary key. It is been imported via an external csv file.
I have a php code which fetches cell values from the current row modifies them and have to replace/update the current row itself. I fetch the results simply by iterating through individual rows.. however as there is no primary key.. i am unable to modify the cell value.
However, since there is no primary key, but php is fetching the current row, i just want to update the current row being fetched. How can we grab the current row?
Thank You.
If you're importing this from a csv file, I would recommend you to add a new "ID" column to the csv file. Set each value in that column to be a unique number (most likely the row number). Then, when you import it into mysql, you'll have a unique row identifier to work with.
if you are using phpmyadmin i suggest you create an "ID" field to make your task easier