I have the following problem.
I am adding a new record in a table.
How can I know the ID provided by the database of the new record?
suppose my table has 3 attributes:
* ID: automatically calculated by the DB server when adding a new record
I am using the Microsoft SQL server DB and the following code:
$q="insert into t_mytable values ('value1','value2')";
$result=odbc_exec($conn, $q) or die("".odbc_errormsg());
Now I need to send an email with the ID of this record, but I have an error
when I do this:
echo odbc_result($result ,"ID");