|
From: <cre...@us...> - 2007-11-25 23:12:49
|
Revision: 1785
http://frontierkernel.svn.sourceforge.net/frontierkernel/?rev=1785&view=rev
Author: creecode
Date: 2007-11-25 15:12:54 -0800 (Sun, 25 Nov 2007)
Log Message:
-----------
moved maxRows < 0 check above loop, define result
Modified Paths:
--------------
ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/easyQuery.fvc
Modified: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/easyQuery.fvc
===================================================================
--- ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/easyQuery.fvc 2007-11-25 23:08:07 UTC (rev 1784)
+++ ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/easyQuery.fvc 2007-11-25 23:12:54 UTC (rev 1785)
@@ -3,21 +3,28 @@
on easyQuery ( databaseId, query, maxRows = 0 ) {
«Changes
+ «8/27/07; 8:05:14 PM by TAC
+ «moved maxRows < 0 check above loop
+ «define result
«7/20/07; 12:38:56 PM by TAC
«changed method for checking if maxRows is a number
+ «check if queryId is not 0
«6/2/07; 12:00:00 AM by DG
«only get rows if queryId is greater than zero
«5/29/07; 12:00:00 AM by DG
«created
- local ( queryId, dataSet = { }, row, rowCount = 0 );
+ local ( queryId, dataSet = { }, result, row, rowCount = 0 );
- bundle { // is maxRow a number?
+ bundle { // is maxRows a number?
try {
number ( maxRows )}
else {
scriptError ( "mySql.easyQuery requires a numeric value for maxRows." )}};
+ if ( maxRows < 0 ) {
+ scriptError ( "mySql.easyQuery requires maxRows to be zero or greater." )};
+
queryId = mySql.compileQuery ( databaseId, query ); // this will scriptError on its own if it fails
if queryId > 0 {
@@ -27,9 +34,7 @@
if result == 0 { // MySQL's code for no more rows
break};
- ++rowCount;
-
- if ( maxRows > 0 ) and ( rowCount > maxRows ) {
+ if ++rowCount > maxRows {
break};
dataSet [ rowCount ] = result};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|