skip to Main Content

Add multiple keys with multiple values in Redis

I have the following txt file hset '0' firstName 'Abel' lastName 'Spencer' birthday '29992291634' gender 'male' task 'farmer' zipcode '1845AP' hset '1' firstName 'Erick' lastName 'Leonard' birthday '29632181211' gender 'female' task 'engineer' zipcode '1382FS' hset '2' firstName 'Janice' lastName 'Montes'…

VIEW QUESTION

What is wrong with my mysql insert statement?

$sql = "INSERT INTO `liftcentrale`(`timedate`,`vraagaanbod`, `date`, `from_place`, `to_place`, `name`, `email`, `gender`, `smoke`, `extra`, `freeyesno`, `price_euro`, `firsttimeryesno`, `seats_offered`) VALUES (CURRENT_TIMESTAMP,'$vraagaanbod','$date','$from_place','$to_place','$name','$email','$gender','$smoke','$extra','$freeyesno','$price_euro','$firsttimeryesno','$seats_offered');"; echo $sql; //CHECK QUERY STRING if ($conn->query($sql) === TRUE) { echo "New record created successfully"; } else { echo "Error: "…

VIEW QUESTION

Mongodb – how to send data to mongo via URL?

i post data to mongodb as following: app.use(bodyParser.json()); app.use(bodyParser.urlencoded({extended:true})); app.use('/insert',async(req,res)=>{ const newProduct=new product({ _id:req.body._id, name:req.body.name, description:req.body.description }); try{ await newProduct.save(); // res.json(newProduct); res.send(`${newProduct} inserted.`); //res.redirect('/'); } catch(err){ res.send(err); } }); Data is taken from the user. The user sends the…

VIEW QUESTION
Back To Top
Search