0){ $query_modifier="WHERE LIMIT $limit"; } }else { $query_modifier=""; } $db = new SQLite3("../../webcron.db"); $res = $db->query("SELECT * FROM $name $query_modifier"); echo '
'; echo '
'; echo '
'; if ( !empty($columns) ) { foreach($columns as $column_name){ echo "
{$column_name}
"; } } else { $counter=0; for ($i = 0; $i < $res->numColumns(); $i++ ){ echo "
{$res->columnName($i)}
"; $counter++; } } echo '
'; while ($row = $res->fetchArray()){ echo "
"; if ( !empty($columns) ) { foreach($columns as $column_name){ echo "
{$row[$column_name]}
"; } } else { for ($i = 0; $i < $counter; $i++){ echo "
{$row[$i]}
"; } } echo "
"; } echo '
'; echo '
'; ?>