[svn r14213] Added Database::fetch_row() to ease transition to db independent functions

skala
Yannick Warnier 17 years ago
parent b6b2ec423d
commit 037d873366
  1. 10
      main/inc/lib/database.lib.php

@ -654,6 +654,16 @@ class Database
}
return mysql_fetch_object($res);
}
/**
* Gets the array from a SQL result (as returned by api_sql_query) - help achieving database independence
* @param resource The result from a call to sql_query (e.g. api_sql_query)
* @return array Array of results as returned by php (mysql_fetch_row)
* @author Yannick Warnier <yannick.warnier@dokeos.com>
*/
function fetch_row($res)
{
return mysql_fetch_row($res);
}
/**
* Gets the number of rows from the last query result - help achieving database independence
* @param resource The result

Loading…
Cancel
Save