If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > reply to aus

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-26-04, 04:50
vijesh vijesh is offline
Registered User
 
Join Date: Feb 2004
Posts: 2
To rectify MySQL Error

Hi,

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
TestEngineer=\"$name\",Status='".$tcstatus[$i]."',TestedOn='".$tctestedon[$i]."',tcupdate='".$tcupdate[$i]."',NaviscoreStatus='".$naviscorestatus[$i]."',NiEMSStatus='".$niemsstatus[$i]."'
,ResultComments='".$comment[$i]."' where id='.$tcid[$i]."' and passid=".$passid[$i]);


Here in this query you can see the following code segment

,ResultComments='".$comment[$i]."'


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,
Vijesh

Last edited by vijesh; 02-26-04 at 05:35.
Reply With Quote
  #2 (permalink)  
Old 02-26-04, 14:17
aus aus is offline
Registered User
 
Join Date: Oct 2003
Location: Denver, Colorado
Posts: 137
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:
Code:
"' where id='.$tcid[$i]."' and passid=".$passid[$i]
Shouldn't it be
Code:
"' where id='".$tcid[$i]."' and passid=".$passid[$i]
?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On