DatabaseRows()
Posted: Fri Jan 13, 2006 9:30 pm
About Database functions, in PHP language we can do :
A native DatabaseRows() function could be useful for counting the number of rows after a DatabaseQuery(). DatabaseColumns() exists so why not for Rows.
Code: Select all
$nbresult = mysql_num_rows($result)
Code: Select all
Procedure.l DatabaseRows()
Protected i
i=0
While NextDatabaseRow()
i+1
Wend
ProcedureReturn i
EndProcedure
If DatabaseQuery("select * from test;")
Debug DatabaseRows()
Else
Debug DatabaseError()
EndIf