Delete invalid positions from database

Ronald2 years ago

Good day all

Can someone kindly assist with a sql command to delete invalid positions from the database?

Thank you

Anton Tananaev2 years ago

What do you mean by invalid?

Ronald2 years ago

Hi Anton

By invalid i mean when a device sent an invalid position to the server with wrong location e.g the sea and the position is marked as "No" where is usually says "YES" under "Valid".
I have since set up a filter for invalid positions but i would like to delete the ones that were accepted already as they mess up reports.

While researching, i came across this:

delete FROM `tc_positions` where valid = 0

Do you think it is correct?

Anton Tananaev2 years ago

Looks correct.