update failing when statement includes

2002-02-05 Thread Victoria Reznichenko

Kinney,

Monday, February 04, 2002, 9:06:45 PM, you wrote:

KB Hi,

KB I'm playing with PHP/MySQL for the first time having used Perl and MySQL
KB for years.

KB In one of my first update scripts, PHP is automatically escaping quotes and
KB such, which I assumed was a good thing.
KB However, I'm noticing that MySQL is rejecting statements like:
KB Update faqs SET subject='Adding FAQ\'s' WHERE id=110 ;
KB It also rejects:
KB Update faqs SET subject=Adding FAQ\'s WHERE id=110 ;
KB I've tested these out on the MySql command line and find the same thing.
KB Rows matched: 1  Changed: 0  Warnings: 0
KB It finds the row but doesn't make the change.

I tested your example and it had worked fine in both cases.

KB Thanks.




-- 
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: update failing when statement includes \

2002-02-04 Thread Zak Greant

  Hi Kinney,

On Mon, 2002-02-04 at 12:06, Kinney Baughman wrote:
 Hi,
 
 I'm playing with PHP/MySQL for the first time having used Perl and MySQL
 for years.
 
 In one of my first update scripts, PHP is automatically escaping quotes and
 such, which I assumed was a good thing.

  PHP has a group of configuration settings that control if this
  behavior is invoked automatically. See http://php.net/configuration.
  The directives that control this are all named /magic_quotes_\w+/
 
 However, I'm noticing that MySQL is rejecting statements like:
 
   Update faqs SET subject='Adding FAQ\'s' WHERE id=110 ;
 
 It also rejects:
 
   Update faqs SET subject=Adding FAQ\'s WHERE id=110 ;

  By reject, do you mean that the call to mysql_query() returns FALSE
  or that the query does not affect the table?
 
 I've tested these out on the MySql command line and find the same thing.
 
   Rows matched: 1  Changed: 0  Warnings: 0
 
 It finds the row but doesn't make the change

  If the UPDATE query does not need to modify the fields referenced, it
  will have this result. Change the value for subject to a different
  value - your query should change the row the first time the query is
  run, but not the second and subsequent times.

 Anyone have a suggestion for what I need to do to get the record updated? 
 I don't find anything in the archives or the manual that addresses this
 problem.
  

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Zak Greant [EMAIL PROTECTED]   
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB
/_/  /_/\_, /___/\___\_\___/   Calgary, Canada 
   ___/   www.mysql.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php