Hey is there a way to automatically extract the last row of a table without knowing anyinformation? EXAMPLE: I have a table titled marshmallow, with field "type" and "color". Now lets say I wanted to find the last row in which color="red", and have the query not return anything BUT the last "red" row. Is that possible? How? Thanks for any help.
sure you can, if you use ORDER BY and LIMIT and had an auto_incremented field, this can be accomplished
btw, you can add an auto field on without messing with any data
I do have an auto_increment field that was just an example. But ORDER BY can't do that as that would still include all the other rows. I only want the query to return ONE SINGLE field not all the others before it. LIMIT wouldn't work because that would only get a certain amount. I was just curious if there was a function or command that would simply return the last field. It's fine if there isn't, but it would save me a half of a half of a half of a second 🙂