Home > m > mysql > mysql_getMaxId.m

mysql_getMaxId

PURPOSE ^

MYSQL_GETMAXID get the maximum AO Id from the server.

SYNOPSIS ^

function id = mysql_getMaxId(mymid)

DESCRIPTION ^

 MYSQL_GETMAXID get the maximum AO Id from the server.
 
 Usage: id = mysql_getMaxId()
 
 M Hewitson 09-05-07
 
 $Id: mysql_getMaxId.html,v 1.1 2007/06/08 14:15:10 hewitson Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function id = mysql_getMaxId(mymid)
0002 
0003 % MYSQL_GETMAXID get the maximum AO Id from the server.
0004 %
0005 % Usage: id = mysql_getMaxId()
0006 %
0007 % M Hewitson 09-05-07
0008 %
0009 % $Id: mysql_getMaxId.html,v 1.1 2007/06/08 14:15:10 hewitson Exp $
0010 %
0011 
0012 curs = exec(mymid, 'select max(id) from aos');
0013 curs = fetch(curs);
0014 id  = curs.Data{1};
0015 close(curs);
0016 
0017 if isnan(id)
0018   id = 0;
0019 end
0020 
0021 % END

Generated on Fri 08-Jun-2007 16:09:11 by m2html © 2003