Results 1 to 2 of 2

Thread: reply to aus

  1. #1
    Join Date
    Feb 2004

    Unanswered: To rectify MySQL Error


    You had asked me to show the SQL I have used in php. The problem is located in this query.....

    update tc_rel_pass_sort set
    ,ResultComments='".$comment[$i]."' where id='.$tcid[$i]."' and passid=".$passid[$i]);

    Here in this query you can see the following code segment


    Result Comments means the comments given by the test manager. I am supposed to read all the comment given by the test manager and put it in HTML. But the problem pops when there is " ' " sign in comments. So I just want MySQL to read all the comments given by test manager and I shoud not make any change in that comments like deleting the special character or adding some special character......

    I think you will be clear with my explanation... Can u help me out. I have to do it today itselt.....

    Thanks and regards,
    Last edited by vijesh; 02-26-04 at 05:35.

  2. #2
    Join Date
    Oct 2003
    Denver, Colorado

    Re: To rectify MySQL Error

    Your string concatenation is not consistent. I don't know PHP, but it doesn't look like you are building the update query right. This code is weird:
    "' where id='.$tcid[$i]."' and passid=".$passid[$i]
    Shouldn't it be
    "' where id='".$tcid[$i]."' and passid=".$passid[$i]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts