Quote:
Originally Posted by Drak
Okay, so, I have this.
Code:
while(SQL_MoreResults(Query)) { &nb sp;SQL_ReadResult(Query,0,Origin[0]); &nb sp;SQL_ReadResult(Query,1,Origin[1]); &nb sp;SQL_ReadResult(Query,2,Origin[2]); &nb sp; &nb sp;new Float istance = get_distance_f(Origin,EntOrigin); &nb sp;if(Distance <= 37.0) &nb sp;{ // RIGHT HERE I WANT TO DELETE THIS ROW &nb sp;} SQL_NextRow(Query); } }
Reading the comment, is it possable to get what row it's reading? So i can delete it. SQL_NextRow doesn't return a value, so I have no idea.
|
Best way to do this is to add a PRIMARY KEY column for the table, normally using AUTO_INCREMENT, that should represent each row with an unique number. Then you can read it and do 'DELETE FROM table WHERE id=%d LIMIT 1'.
__________________