I'm starting a new project shortly and going to use coding standards. I've always written SQL statements like this:
$sql = sprintf("INSERT INTO users (name) VALUES ('%s')", $name);
I'm wondering if there is any performance gained by using one of these:
$sql = "INSERT INTO users (name) VALUES ('".$name."')";
$sql = "INSERT INTO users (name) VALUES ('$name')";
Also: Does this performance difference fluctuate with the addition of more "parameters" (as in the case of the first line of code) ?
Thanks.