在mysql数据库中创建记录的日期

I have table in which I have birthdate , age location and Score and I want to retrieve the count of number of records created between two dates where score is not null and there is no time stamp field.

How can I do it if there is no time stamp field.

Is there any meta data and if it is , how can I run the query?

try a query like this:

SELECT COUNT(*) 
FROM TABLE_NAME 
WHERE BIRTHDATE BETWEEN 'DATE1' AND 'DATE2' 
AND SCORE IS NOT NULL AND TIMESTAMP IS NULL;

Add a column timestamp to the existing table, with default value as NULL, and query the above statement, it should work. Whenever you add a column, to a table already having records, the corresponding values are blank for that new column, for existing records.

Add a timestamp to your tables

Echoed here as other users have noted.

Because you have no date reference field in the database, you can't pull out records that match one or that are between two dates.

Your best bet from here on in, is to add a date field and then make sure when data is written to the DB, you insert a date/datetime using mysql now() function. There are a few different ways to achieve it, but this is probably the easiest:

mysql_query("
   INSERT INTO users (first, last, whenadded) 
   VALUES ('$first', '$last', now())
";