Re: SQL unexpected T_CONSTANT_ENCAPSED_STRING Error

From: Date: Thu, 22 Mar 2007 13:28:53 +0000
Subject: Re: SQL unexpected T_CONSTANT_ENCAPSED_STRING Error
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-43319@lists.php.net to get a copy of this message
Hi Laitha, And with backslashes before them ?? jm ----- Original Message ----- From: "Lasitha Alawatta" <lasitha_lk@yahoo.co.uk> To: <php-db@lists.php.net> Sent: Thursday, March 22, 2007 2:06 PM Subject: [PHP-DB] SQL unexpected T_CONSTANT_ENCAPSED_STRING Error
Hi All, I have a sql script unable to execute. Because I need to insert double-coats ( " ) also to one field(SPParams field). Ones I execuit this using mysql_query($sql), it gives "Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING " error message.
    $strSql = "";
  $strSql = $strSql."UPDATE Masters.tblBranches SET FHeadMail= 'aind@abc.net;', ";
  $strSql = $strSql."BranchDBConnection='Server=SLBC05; Database=BackOffice; UID=b0;pwd=sSLap.+05);', ";
  $strSql = $strSql."SPParams='<pl><ipl><p id="spCustomersAddSLBC" t="VarChar">CustomerName</p><p id="spCustomersAddSLBC" t="TinyInt">CustomerType</p>' ";
$strSql = $strSql."WHERE BranchCode=101"; How can I be able to solve this issue..? Thank you very much, Lasitha --------------------------------- What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship.


« previous php.db (#43319) next »