Jump to content

Archived

This topic is now archived and is closed to further replies.

AV1611

Query don't run???

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+

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

×

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.