Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async function PutData(name, email, ssn, amount){
- const client = new Client({
- user: 'postgres',
- host: 'localhost',
- database: 'postgres',
- password: 'Pluto050196',
- });
- await client.connect();
- const data = await client.query(
- 'SELECT date, name, email, amount, ssn FROM tafla',
- )
- await client.end()
- const gogn = data.rows;
- gogn.unshift(['date', 'name', 'email', 'amount', 'ssn']);
- return gogn;
- }
Add Comment
Please, Sign In to add comment