DPoole
09-13-2003, 10:33 AM
Hello
Just trying to keep the query count down on the board.
Say for example you have a query to add some data onto the table
$DB_site->query("INSERT INTO test
(id,data1,data2,data3)
VALUES
(NULL,'".date("Ymd")."','1','".time()."')
");
then I wanted to use this information to populate another table is there a way of getting the Id value without doing a query SELECT to find the last row added to the table that has data1, data2 and data3 match and get the ID for it ?
Hope I've made sence here ?
Just trying to keep the query count down on the board.
Say for example you have a query to add some data onto the table
$DB_site->query("INSERT INTO test
(id,data1,data2,data3)
VALUES
(NULL,'".date("Ymd")."','1','".time()."')
");
then I wanted to use this information to populate another table is there a way of getting the Id value without doing a query SELECT to find the last row added to the table that has data1, data2 and data3 match and get the ID for it ?
Hope I've made sence here ?