What is the difference between a single (?) And a double question mark (??) in node-mysql?

I'm sure this is pretty obvious, it would be more reasonable for me if the second double question mark in the example was the only one.

From docs :

Alternatively can you use? characters as placeholders for identifiers that you would like to slip away as follows:

var userId = 1; var columns = ['username', 'email']; var query = connection.query('SELECT ?? FROM ?? WHERE id = ?', [columns, 'users', userId], function(err, results) { // ... }); console.log(query.sql); // SELECT `username`, `email` FROM `users` WHERE id = 1 
+5
source share
1 answer

?? used for table and column names, it avoids them with reverse windows. ? for ordinary values.

+10
source

All Articles