Jump to content

Query don't run???


AV1611

Recommended Posts

I can't figure out what's wrong with this...

[code]
while ($row=mysql_fetch_array($result)){
$PN = $row['MFG1_PN'];
$PLUS = "+";
$NPN = $PN.$PLUS;
echo $NPN." Added<br/>";
$sql=("update LBRYPERM set MFG5_PN = '$NPN' where MFG1_PN = '$PN' and MFG5 = ''") or die (mysql_error());}
[/code]

It gives no error, and echos out ok, but doesn't write the data to the field... Am I missing something???

All this is supposed to do is take the part number in MFG1_PN and copy it to MFG1_PN and add a + to it

IF MFG1_PN is ABC123 then MFG5_PN should be ABC123+
Link to comment
Share on other sites

Below is a good example why you shouldn't write code when you have the flu...

[!--quoteo(post=367201:date=Apr 21 2006, 09:46 AM:name=AV1611)--][div class=\'quotetop\']QUOTE(AV1611 @ Apr 21 2006, 09:46 AM) [snapback]367201[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I can't figure out what's wrong with this...

[code]
while ($row=mysql_fetch_array($result)){
$PN = $row['MFG1_PN'];
$PLUS = "+";
$NPN = $PN.$PLUS;
echo $NPN." Added<br/>";
$sql=

// I forgot to put mysql_query here


("update LBRYPERM set MFG5_PN = '$NPN' where MFG1_PN = '$PN' and MFG5 = ''") or die (mysql_error());}
[/code]

It gives no error, and echos out ok, but doesn't write the data to the field... Am I missing something???

All this is supposed to do is take the part number in MFG1_PN and copy it to MFG1_PN and add a + to it

IF MFG1_PN is ABC123 then MFG5_PN should be ABC123+
[/quote]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.