determine value differences between form submissions
If you're looking for a non-SQL way to get data out of the database the db_select() function (which returns an SelectQuery) is the way to go. For obvious reasons there's no implicit API implemented for your custom data tables (you'd need to create that yourself).

Without knowing your schema this can't be totally accurate, but the basics are:

$query = db_select('my_table', 't')
  -&gt;fields('t', array('field1', 'field2'))
  -&gt;condition('some_column', 'some_value');

$results = $query-&gt;execute();
foreach ($results as $result) {
  // $result is an object, use it...
}


SelectQuery has a bunch of helper methods to get specifically formatted data out of the database, so chances are you won't need to loop over the data. You can find a list of those helper functions (and info on the alternative, SQL based approach that still uses the API) here