Thread
:
NEW DBI API (MySQL /SQL)
View Single Post
BAILOPAN
Developer
Join Date: Jan 2004
06-11-2004 , 23:19
#
4
If the result is an empty set, the return value for the result handle (in this program, it is res), will be 0.
That's why I did <0 for INSERT, to check if the insert succeeded, and <=0 for SELECT, to make sure there were items in the table.
Last insert id is a MySQL only feature so I won't add it to the DBI I think. You can do this:
SELECT MAX(field) FROM table
and get the first (only) result.
__________________
egg
BAILOPAN
View Public Profile
Send a private message to BAILOPAN
Visit BAILOPAN's homepage!
Find More Posts by BAILOPAN