this is my current function:
$result = $db->sql_query("SELECT * FROM data1,data2,data3,data4 WHERE person='" .$name. "'");
$row = $db->sql_fetchrow($result);
$day = $row['regtime'];
$days = (strtotime(date("Y-m-d")) - strtotime($row['regtime'])) / (60 * 60 * 24);
if($row > 0 && $days < 15){
$row = ['name'];
$row = ['age'];
//etc
but above function does double read in regtime
row. what I am looking is can I club both function into single query?? if yes how??