Page 1 of 1

Need help with " and ' and concatention

Posted: Fri Mar 13, 2009 10:29 pm
by katkat
Can anyone help me with this concatenation?

$query = "DELETE FROM runners WHERE firstname.lastname=" . $runnernames && passw=$pw;

- $runnernames has the first and last name in it with no spaces, for example: johndoe
- I am not able to get the passw included correctly in this statement
thanks!!

Re: Need help with " and ' and concatention

Posted: Fri Mar 13, 2009 10:35 pm
by Benjamin

Code: Select all

 
$query = "DELETE
           FROM
             runners
           WHERE
             CONCAT(firstname, lastname) = '" . mysql_real_escape_string($runnernames) . "'
             AND passw = '" . mysql_real_escape_string($pw) . "'";