In message <cb70b5cce4319d4abea54bb12d3117cfe45...@southcotpdc.southcot.
org>, Charlie Markwick <c...@southcot.com> writes
>Given:-
>
>$strFields = 'Gender=%s, UserName=%s';
>$strValues = '"Male","charlie","nhy01"';
>
>why does:-
>
>$strUpdateSQL = sprintf('UPDATE UserTable SET ' . $strFields . ' WHERE
>ID=%s', "Male","charlie","nhy01"); 
>
>work, while:-
>
>$strUpdateSQL = sprintf('UPDATE UserTable SET ' . $strFields . ' WHERE
>ID=%s', $strValues);  
>
>doesn't?
>
>Charlie

Because no matter what you put into $strValues, it is still only a
single string, no matter how many quotes it contains.

And you need 2 strings 
(or is it 3? $strFields says 2, $strValues says 3)


-- 
Pete Clark

Hot Costa - Local Spain
http://www.hotcosta.com

Reply via email to