foreach actions as action _lines db prepare SELECT FROM location_lines

1
2
3
4
5
6
7
8
9
foreach($actions as $action){
$_lines = $db -> prepare('SELECT * FROM `location_lines` WHERE `action` = ? AND `action_` = ? AND `action_` <> ? LIMIT 1');
$_lines -> execute([$user['action'], $action['id'], $user['action']]);
$line = $_lines -> fetch();
if($action['id'] !== $user['action'] and $line) echo '
<a href="?i=action&action='.$action['id'].'" style="top:'.(($action['left'] / 222) * 100).'%; left:'.(($action['top'] / 300) * 100).'%"></a>
';
}