Jump to content

concatenation operator or just single quotes?


V

Recommended Posts

I'm trying to decide which is better or if there is any significant difference between the two. Both are within function brackets and they seem to work either way.  :hail_freaks:

 

$result = $conn->query("update user
                          set passwd = sha1('".$new_password."')
                          where username = '".$username."'");


$result = $conn->query("update user
                          set passwd = sha1('$new_password')
                          where username = '$username'");

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.