Hi
I would like to select multiple table in one query say like below and insert into multiple table:
$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
}else { //do something
if ($row == 0 && $name > 0){
$db->sql_query("INSERT INTO data1 ??????
}
This seems problem as days are not been calculated hence it always process new data and not accessing stored data in table...
Is there any way which this can get work??