Hullo all!
I'm not sure if this is possible or not, but i'm not really too up on my SQL. . .
I have a page where customers can insert comment cards. After the comment card is inserted, i would like to return what number the autoincrement assigned to the new row.
The pseudocode would kinda flow like this
---
$strSQLQuery = "insert into tblfoo(one, two, three) values (1, 2, 3)";
prepare($strSQLQuery);
execute($strSQLQuery);
## MAGIC HAPPENS WHERE I GET THE ROW NUMBER ($intIndex) HERE. . .##
print "Your comment card number is $intIndex. Please remember this for your records";
---
Much thanks to everyone in advance!
- alex
I'm not sure if this is possible or not, but i'm not really too up on my SQL. . .
I have a page where customers can insert comment cards. After the comment card is inserted, i would like to return what number the autoincrement assigned to the new row.
The pseudocode would kinda flow like this
---
$strSQLQuery = "insert into tblfoo(one, two, three) values (1, 2, 3)";
prepare($strSQLQuery);
execute($strSQLQuery);
## MAGIC HAPPENS WHERE I GET THE ROW NUMBER ($intIndex) HERE. . .##
print "Your comment card number is $intIndex. Please remember this for your records";
---
Much thanks to everyone in advance!
- alex