[Zope] Finding out how many rows is selected in database

Thomas B. Passin tpassin@mitretek.org
Thu, 5 Apr 2001 15:05:57 -0400


Gitte Wange wrote -


Well if you make MySQL select the next_id for you - what happens then if
there
are no records in the table? Will it then return 1 (if you say select
max(id)+1)
???

It ***should*** return null (that is, 1+null-->null).  SQLAnywhere does (I
just tested it for you).  But I don't know if MySQL acts correctly or not.
I don't have it installed.  Just make a table with one column, don't
populate it, and try it out.

Cheers,

Tom P