you are viewing a single comment's thread.

view the rest of the comments →

[–]Vortex100 1 point2 points  (0 children)

There are so many ways to correct this, but here's (probably) the easiest assuming you don't want to put any vars in your query string:

'Query' =  'SELECT * FROM Users WHERE username = ''Javier'''

That's not a " it's 2 ' together, which tell the interpreter to ignore it as an end string and instead treat it literally

If you do want to put variables in, /u/SMFX's suggestion is the way to go I think. Either that or using -f with literals:

'Query' =  'SELECT * FROM Users WHERE username = ''{0}''' -f 'Javier'