AV1611 Posted April 21, 2006 Share Posted April 21, 2006 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 itIF MFG1_PN is ABC123 then MFG5_PN should be ABC123+ Quote Link to comment Share on other sites More sharing options...
AV1611 Posted April 21, 2006 Author Share Posted April 21, 2006 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 itIF MFG1_PN is ABC123 then MFG5_PN should be ABC123+[/quote] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.