Is there a function to do this?
$sql="SELECT MIN(id) AS smallest, MAX(id) AS biggest FROM mdl_some_table";
$result=mysql_query($sql);
$line=mysql_fetch_object($result);
I want to make Moodle like code
Teemu Sumi
$info = get_record_select("some_table", "", "MIN(id) AS smallest, MAX(id) AS biggest");
echo $info->smallest;
echo $info->biggest;