BluePrint
BluePrint

Reputation: 2134

Getting the time on a MySQL DB table entry

I have a application form that should have been closed last friday. Due to things I can't control, it wasn't closed, and now people have applied after last friday. Unfortunately, those people can't come to the event, so we have to contact them to tell them the bad news.

My problem is, that when I made the form I was too fast and forgot to add a timestamp in the table.

Is there some way (either using php, phpmyadmin or sql-commands) to find out who has applied after a certain time (i.e. when the row was added to the table)?

The Database is a MySQL-database.

Upvotes: 0

Views: 65

Answers (2)

Matt The Ninja
Matt The Ninja

Reputation: 2731

This may be possible if you have logging on (not on by default).

Your log file location is configured here in a .conf file.

/etc/*.conf

The logging will be written in that file as..

log=/tmp/yourlogfilename.log

If this is set you can go to that log and see when/what queries where used.

Upvotes: 0

O. Jones
O. Jones

Reputation: 108641

Does the table have an autoincrementing ID field?

If so, figure out the value of that ID field for the last person you were able to accept, then use this query in an SQL client like phpmyadmin.

  SELECT * 
    FROM tablename
   WHERE tablename.id > last_accepted_id

That will show all the rows for people to which you owe bad news.

Upvotes: 1

Related Questions