-
-
Save TiuTalk/3050552 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sql = sprintf("SELECT * FROM `NFE_ENTRADA` WHERE `CHAVENFE` = '%s'", $CHAVENFE); | |
$query = mysql_query($sql); | |
$i = 0; | |
while ($produto = mysql_fetch_object($sql)) { ?> | |
<tr> | |
<td height="17" bgcolor="#FFFFFF" class="style7" align="center"><?php echo $produto->cProd ?></td> | |
<td width="35%" bgcolor="#FFFFFF" class="style7" align="center"><?php echo $produto->xProd . ' / ' . $produto->infAdProd ?></td> | |
<td width="10%" bgcolor="#FFFFFF" class="style7" align="center"><?php echo $produto->NCM ?></td> | |
<td bgcolor="#FFFFFF" class="style7" align="center"><?php echo $produto->qCom ?></td> | |
<td width="9%" bgcolor="#FFFFFF" class="style7" align="center"><?php echo $produto->vUnCom ?></td> | |
<td height="17" bgcolor="#FFFFFF" class="style7" align="center"><?php echo $produto->vProd ?></td> | |
<td height="17" bgcolor="#FFFFFF" class="style7"> | |
<input type="hidden" name="produto[<?php echo $i ?>][cProd]" value="<?php echo $produto->cProd ?>" /> | |
<input type="text" name="produto[<?php echo $i ?>][dataLancamento]" value="" /> | |
</td> | |
</tr> | |
<?php $i++; } ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$produtos = $_POST['produto']; | |
foreach ($produtos AS $produto) { | |
$sql = sprintf("UPDATE `NFE_ENTRADA` SET `DT_DISTRIBUICAO` = '%s' WHERE `cProd` = '%s' AND `CHAVENFE` = '%s'", | |
$produto['dataLancamento'], $produto['cProd'], $CHAVENFE); | |
var_dump($sql); | |
// $query = mysql_query($sql); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment