ошибка: в этом foreach ($actions as $action){
пишет что : Warning: Invalid argument supplied for foreach()
Code
<?php
$action = $mysql->query("select * from daily_actions");
while ($row = $mysql->fetch($action)){
$actions[] = $row;
}
$dailyAction = $mysql->fetch($mysql->query("select id from daily_current_tracking"));
foreach ($actions as $action){
$name = $action[name];
$name = strtoupper($name);
if ($action[id] == $dailyAction[id]){
define($name, TRUE);
}else{
define($name, FALSE);
}
}
?>
потскажите как исправить!!