Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

130
Views
I want to add single quotes in the below code ('')
let name=Response.name; 

//suppose in name i am getting name=Manav

now what i need to do is

con.query("Select * from accounts_master where name="(name)

i want Manav as 'Manav' in the above line i.e Select * from accounts_master where name='Manav'

Please help for the same

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Please use prepared statements instead of simple string concatenation or templates:

con.query('SELECT * FROM accounts_master WHERE name = ?', [name], (err, rows) => {
  console.log(rows);
})

Doing otherwise may leave you vulnerable to SQL injection attack, as Bobby Tables demonstrates.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!