tags:

views:

41

answers:

1

I have removed the same. found myself a solution. No answer is required

thanks

A: 

If table-1 and table-2 are different, you should be able do this in one statement:

INSERT INTO table-2 (regtime,person,catog,position,location,rank)
  SELECT NOW(),person,catog,position,location,rank 
    FROM table-1 
    WHERE regtime = DATE(NOW()) 
    ORDER BY rank ASC 
    LIMIT 1

If you're have other problems, insert a few bits of diagnostic output into your code, so that you can see which branch gets executed, and dump the contents of $row. You should also check for mysql_query failing and show any errors that result.

Paul Dixon
Paul your answer was guideline for me to find the solution. thank you verymuch
mathew