class updating {
function update() {
$aaa = rand(0,10000000);
$conn = mysql_connect('localhost', 'user', 'pass');
mysql_select_db('database1');
$sqls = "UPDATE `table1` SET column1='$aaa'";
$results = mysql_query($sqls, $conn);
mysql_close($conn);
return $aaa;
}
}
$now = new updating;
$now->update();
How do you extract $sec from $now?
I have tried:
$aaa = $now;
and
$aaa = update();
I need $aaa to continue with my programming.