Skip to content

Instantly share code, notes, and snippets.

@sr3d
Created October 5, 2010 17:49
Show Gist options
  • Save sr3d/611992 to your computer and use it in GitHub Desktop.
Save sr3d/611992 to your computer and use it in GitHub Desktop.
ActiveRecord.executeScalar = function() {
// arguments.splice(0,1);
var rows = ActiveRecord.execute.apply(this, arguments);
var value = rows.isValidRow() ? rows.field(0) : null;
rows.close();
return value;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment