Get rows inserted after last fetch from Mysql table without primary key

So, I have a table with three columns.

Customer_number

, login_hash

andsome_hash

UserNumber is not an auto-increment identifier, and the table is indexed in login_hash. Now the table is updated every hour and new records are added. I have to get new records, use them for some calls and then save the received data.

My plan is to always store the last line number in some environment variable last_row

and then retrieve the values ​​after that line number until the last entry. Then update the number last_row

.

How can I achieve this? And is there a better approach to this problem?

I know this is bad table design, but I have to deal with this and cannot change it.

+3


source to share





All Articles