http://old-release.ubuntu.com/ubuntu
http://archive.ubuntu.com/ubuntu
http://ru.archive.ubuntu.com/ubuntu
чтобы сайт работал только после загрузки данной подложки
SELECT u.*, t.type_name, t.description
FROM users AS u
LEFT JOIN type_user AS tu ON tu.id_user = u.id
LEFT JOIN types AS t ON tu.id_type = t.id
WHERE u.id = 1;
const { MongoClient } = require("mongodb");
// Replace the uri string with your MongoDB deployment's connection string.
const uri =
"mongodb+srv://<user>:<password>@<cluster-url>?writeConcern=majority";
const client = new MongoClient(uri);
async function run() {
try {
await client.connect();
const database = client.db("sample_mflix");
const movies = database.collection("movies");
// Query for a movie that has the title 'The Room'
const query = { title: "The Room" };
const options = {
// sort matched documents in descending order by rating
sort: { rating: -1 },
// Include only the `title` and `imdb` fields in the returned document
projection: { _id: 0, title: 1, imdb: 1 },
};
const movie = await movies.findOne(query, options);
// since this method returns the matched document, not a cursor, print it directly
console.log(movie);
} finally {
await client.close();
}
}
run().catch(console.dir);
const example = (arr) => {
let result = [];
if (Array.prototype.hasOwnProperty.call(arr, 0) && arr[0] instanceof Object)
result.push(arr[0]);
let lastObj = result[0];
for (let i = 1; i < arr.length; ++i) {
const el = arr[i];
if (el && el instanceof Object) {
lastObj.children = el;
lastObj = el;
}
}
return result;
}