maurohpg 0 Denunciar post Postado Maio 9, 2010 Olá estou com uma probleminha que não consigo resolver, já revirei o código e mesmo assim não consigo achar o erro, estou fazendo um update no banco de dados e um insert e ambos não estou conseguindo gravar e nem atualizar alguém pode me dar um luz de o que pode estar ocorrendo? Agradeço desde já! <?php require_once "../../global.php"; require_once "../../inc/adodb/adodb.inc.php"; require_once "../../inc/inc.db.php"; require_once "../../inc/inc.sistema.php"; require_once "../inc/class.db.php"; require_once "../inc/class.logon.php"; require_once "../inc/functions.php"; require_once "../inc/exe.logon.php"; require_once "../inc/exe.page_security.php"; require_once "../inc/class.GenericEasyPagination.php"; require_once "../inc/class.cdate.php"; require_once "../js/fckeditor/fckeditor.php"; require_once "../inc/class.flag_imagem.php"; $act = cg('act'); if($act==""): $act = "show"; endif; $id = cg('id'); if($id==""): $id = 0; endif; $a = cg('a'); $opt = cg('opt'); if($a=='1'): $segmento = cp('segmento'); $data = date_my(cp('data')); $titulo = cp('titulo'); $descritivo = cp('descritivo'); $local = cp('local'); $google = cp('google'); $cronograma = cp('cronograma'); $locacao = cp('locacao'); $fundacao = cp('fundacao'); $alvenaria = cp('alvenaria'); $estrutura = cp('estrutura'); $pintura = cp('pintura'); $ceramica = cp('ceramica'); $esquadrias = cp('esquadrias'); $instalacoes = cp('instalacoes'); $acabamento = cp('acabamento'); $revesinterno = cp('revesinterno'); $revesexterno = cp('revesexterno'); $cronoi = cp('cronoi'); $cronof = cp('cronof'); $ativo = cp('ativo'); switch($opt): case 'ins': $sql = "INSERT INTO T_OBRA (`COD_SEGMENTO_OBRA` , `DS_OBRA` , `DS_DESCRITIVO` , `DS_LOCAL` , `DS_GOOGLE`, `DS_CRONO`, `NR_LOCACAO` , `NR_FUNDACAO` , `NR_ESTRUTURA` , `NR_ALVENARIA` , `NR_PINTURA` , `NR_CERAMICA` , `NR_ESQUADRIAS` , `NR_ESQUADRIAS` , `NR_INSTALACOES` , `NR_ACABAMENTOS` , `NR_REVINTERNO` , `NR_REVEXTERNO` , `DT_CRONO_I` , `DT_CRONO_F` , `DT_ENTREGA`) VALUES (".$segmento.", '".$titulo."', '".$descritivo."', '".$local."', '".$google."', ".$locacao.", ".$fundacao.", ".$estrutura.", ".$alvenaria.", ".$estrutura.", ".$pintura.", ".$ceramica.", ".$esquadrias.", ".$instalacoes.", ".$acabamento.", ".$revesinterno.", ".$revesexterno.", ".$cronoi.", ".$cronof.", '".$ativo."', '".$data."') "; $DB->Execute($sql); break; case 'upd': $sql = "UPDATE T_OBRA SET COD_SEGMENTO_OBRA=".$segmento.", DS_OBRA='".$titulo."', DS_DESCRITIVO='".$descritivo."', DS_LOCAL='".$local."', DS_GOOGLE='".$google."', DS_CRONO='".$cronograma."', NR_LOCACAO=".$locacao.", NR_FUNDACAO=".$fundacao.", NR_ESTRUTURA=".$estrutura.", NR_ALVENARIA=".$alvenaria.", NR_PINTURA=".$pintura.", NR_CERAMICA=".$ceramica.", NR_ESQUADRIAS=".$esquadrias.", NR_INSTALACOES=".$instalacoes.", NR_ACABAMENTOS=".$acabamento.", NR_REVINTERNO=".$revesinterno.", NR_REVEXTERNO=".$revesexterno.", DT_CRONO_I=".$cronoi.", DT_CRONO_F=".$cronof.", FL_ATIVO='".$ativo."', DT_ENTREGA='".$data."' WHERE (COD_OBRA=".$id.")"; $DB->Execute($sql); break; case 'del': $DB->Execute("DELETE FROM T_OBRA WHERE (COD_OBRA=".$id.") "); break; endswitch; header("Location: ".$_SERVER['PHP_SELF']."?act=show"); exit(); endif; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type=text/css href="../../css/jquery-ui-1.7.2.custom.css" /> <script type="text/javascript" src="../js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="../js/jquery-ui-1.7.2.custom.min.js"></script> <script type="text/javascript" src="../js/calendario.js"></script> <title><?php print SITE_TITULO;?></title> <?php require_once("../inc/inc.meta_tags.php");?> <style type="text/css"> <!-- @import url("../css/estilos.css"); --> </style> <script type="text/javascript" src="../js/scripts.js"></script> <script type="text/javascript" src="../js/ajax_lib.js"></script> </head> <body> <?php require_once("../inc/htm.top.php"); ?> <?php require_once("../inc/htm.menu.php"); ?> <div id="main"> <?php switch($act): case "form": if($id > 0): $opt = "upd"; $sql = "SELECT * FROM T_OBRA WHERE (COD_OBRA=".$id.") "; $rs = $DB->Execute($sql); $segmento = $rs->fields['COD_SEGMENTO_OBRA']; $data = date_br($rs->fields['DT_ENTREGA']); $titulo = $rs->fields['DS_OBRA']; $descritivo = $rs->fields['DS_DESCRITIVO']; $local = $rs->fields['DS_LOCAL']; $google = $rs->fields['DS_GOOGLE']; $cronograma = $rs->fields['DS_CRONO']; $locacao = $rs->fields['NR_LOCACAO']; $fundacao = $rs->fields['NR_FUNDACAO']; $estrutura = $rs->fields['NR_ESTRUTURA']; $alvenaria = $rs->fields['NR_ALVENARIA']; $pintura = $rs->fields['NR_PINTURA']; $ceramica = $rs->fields['NR_CERAMICA']; $esquadrias = $rs->fields['NR_ESQUADRIAS']; $instalacoes = $rs->fields['NR_INSTALACOES']; $acabamento = $rs->fields['NR_ACABAMENTOS']; $revesinterno = $rs->fields['NR_REVINTERNO']; $revesexterno = $rs->fields['NR_REVEXTERNO']; $cronoi = date_br($rs->fields['DT_CRONO_I']); $cronof = date_br($rs->fields['DT_CRONO_T']); $ativo = $rs->fields['FL_ATIVO']; else: $opt = "ins"; $data = date("d/m/Y"); $titulo = ""; $descritivo = ""; $cronograma = ""; $locacao = 0; $fundacao = 0; $estrutura = 0; $alvenaria = 0; $pintura = 0; $ceramica = 0; $esquadrias = 0; $instalacoes = 0; $acabamento = 0; $revesinterno = 0; $revesexterno = 0; $cronoi = date("d/m/Y"); $cronof = date("d/m/Y"); $ativo = "S"; endif; ?> <h1>Obras - Incluir/modificar registro</h1> <form action="<?php print $_SERVER['PHP_SELF'];?>?id=<?php print $id;?>&a=1&opt=<?php print $opt;?>" method="post" name="form" onsubmit="MM_validateForm('input-normal','input-alerta','segmento','Segmento','R','titulo','Título','R');return MM_returnValue;"> <table border="0" align="center" cellpadding="4" cellspacing="2"> <tr> <td align="right"><strong>Segmento:</strong></td> <td width="2" rowspan="19"> </td> <td><select name="segmento" id="segmento"> <option value="">-- Selecione --</option> <?php $combo = $DB->Execute("SELECT * FROM T_OBRA_SEGMENTO ORDER BY DS_SEGMENTO ASC"); while(!$combo->EOF): ?> <option value="<?php print $combo->fields['COD_SEGMENTO_OBRA'];?>" <?php if($segmento==$combo->fields['COD_SEGMENTO_OBRA']){print 'selected';}?>> <?php print $combo->fields['DS_SEGMENTO'];?></option> <?php $combo->MoveNext(); endwhile; ?> </select></td> <td align="right"><strong>Data Entrega:</strong></td> <td> </td> <td><input name="data" type="text" id="data" size="15" maxlength="10" value="<?php print $data;?>" style="text-align:center;" onfocus="this.select();" /></td> </tr> <tr> <td align="right"><strong>Título:</strong></td> <td width="266"><input name="titulo" type="text" id="titulo" size="70" maxlength="100" value="<?php print $titulo;?>" /></td> <td align="right"><strong>Ativo:</strong></td> <td width="2"> </td> <td><select name="ativo" id="ativo"> <option value="S" <?php if($ativo=='S'){print 'selected';}?>>Sim</option> <option value="N" <?php if($ativo=='N'){print 'selected';}?>>Não</option> </select></td> </tr> <tr> <td align="right"><strong>Localização:</strong></td> <td colspan="4"><input name="local" type="text" id="local" size="70" maxlength="100" value="<?php print $local;?>" /></td> </tr> <tr> <td align="right"><strong>Google Earth:</strong> </td> <td colspan="4"><input name="google" type="text" id="google" size="100" maxlength="220" value="<?php print $google;?>" /></td> </tr> <tr> <td align="right"><strong>Cronograma</strong>:</td> <td colspan="4"><input name="cronograma" type="text" id="cronograma" size="100" maxlength="220" value="<?php print $cronograma;?>" /></td> </tr> <tr> <td align="right"><strong>Início:</strong></td> <td colspan="4"><input name="cronoi" type="text" id="cronoi" size="15" maxlength="10" value="<?php print $cronoi;?>" readonly="readonly"/></td> </tr> <tr> <td align="right"><strong>Ter</strong>mino:</td> <td colspan="4"><input name="cronof" type="text" id="cronof" size="15" maxlength="10" value="<?php print $cronof;?>" /></td> </tr> <tr> <td align="right"><strong>Locação:</strong></td> <td colspan="4"><input name="locacao" type="text" id="locacao" size="3" maxlength="3" value="<?php print $locacao;?>" /> % </td> </tr> <tr> <td align="right"><strong>Fundação:</strong></td> <td colspan="4"><input name="fundacao" type="text" id="fundacao" size="3" maxlength="3" value="<?php print $fundacao;?>" /> %</td> </tr> <tr> <td align="right"><strong>Estrutura:</strong></td> <td colspan="4"><input name="estrutura" type="text" id="estrutura" size="3" maxlength="3" value="<?php print $estrutura;?>" /> %</td> </tr> <tr> <td align="right"><strong>Alvenaria:</strong></td> <td colspan="4"><input name="alvenaria" type="text" id="alvenaria" size="3" maxlength="3" value="<?php print $alvenaria;?>" /> %</td> </tr> <tr> <td align="right"><strong>Pintura:</strong></td> <td colspan="4"><input name="pintura" type="text" id="pintura" size="3" maxlength="3" value="<?php print $pintura;?>" /> %</td> </tr> <tr> <td align="right"><strong>Cerâmica:</strong></td> <td colspan="4"><input name="ceramica" type="text" id="ceramica" size="3" maxlength="3" value="<?php print $ceramica;?>" /> %</td> </tr> <tr> <td align="right"><strong>Esquadrias:</strong></td> <td colspan="4"><input name="esquadrias" type="text" id="esquadrias" size="3" maxlength="3" value="<?php print $esquadrias;?>" /> %</td> </tr> <tr> <td align="right"><strong>Instalações:</strong></td> <td colspan="4"><input name="instalacoes" type="text" id="instalacoes" size="3" maxlength="3" value="<?php print $instalacoes;?>" /> %</td> </tr> <tr> <td align="right"><strong>Acabamento:</strong></td> <td colspan="4"><input name="acabamento" type="text" id="acabamento" size="3" maxlength="3" value="<?php print $acabamento;?>" /> %</td> </tr> <tr> <td align="right"><strong>Rev. Interno:</strong></td> <td colspan="4"><input name="revesinterno" type="text" id="revesinterno" size="3" maxlength="3" value="<?php print $revesinterno;?>" /> %</td> </tr> <tr> <td align="right"><strong>Rev. Externo:</strong></td> <td colspan="4"><input name="revesexterno" type="text" id="revesexterno" size="3" maxlength="3" value="<?php print $revesexterno;?>" /> %</td> </tr> <tr> <td align="right"><strong>Descritivo:</strong></td> <td colspan="4"><img src="../img/spacer.gif" width="30" height="25" /></td> </tr> <tr> <td colspan="6"> <?php $oFCKeditor = new FCKeditor('descritivo') ; $oFCKeditor -> BasePath = '../js/fckeditor/'; $oFCKeditor -> Value = $descritivo; $oFCKeditor -> Create() ; ?></td> </tr> <tr> <td height="40" colspan="6" align="right"><input type="submit" name="Submit" value="Salvar" style="float:left;" /> <input type="button" name="Button" value="Voltar" style="float:right;" onclick="javascript:history.back();" /></td> </tr> </table> </form> <?php break; case "show": $fl_img = new flag_imagem; $q = cg('q'); ?> <form action="" name="busca" id="busca" method="get"> <img src="../img/ico-busca.png" alt="Buscar" width="16" height="16" hspace="4" align="absmiddle" />Buscar: <input name="q" type="text" value="<?php print $q;?>" onfocus="this.select();" /> </form> <h1>Obras - Listar Registros</h1> <div id="sub_menu"> <a href="<?php print $_SERVER['PHP_SELF'];?>?act=form" title="Inserir Registro"><img src="../img/ico-inserir.gif" alt="Inserir" width="16" height="16" border="0" align="absmiddle"/> Inserir Obra </a><?php $logon->lg_Mount_Submenu();?> </div> <?php $order = cg('order'); $card = cg('card'); $page = cg('page'); if(empty($page)): $page = 1; endif; define ('RECORDS_BY_PAGE',20); define ('CURRENT_PAGE',$page); $DB->SetFetchMode(ADODB_FETCH_ASSOC); if(empty($order)): $order = " DS_OBRA "; endif; if(empty($card)): $card = " DESC "; endif; if($q != ''): $sql = " SELECT a.*, b.DS_SEGMENTO FROM T_OBRA a LEFT JOIN T_OBRA_SEGMENTO b ON (a.COD_SEGMENTO_OBRA=b.COD_SEGMENTO_OBRA) WHERE (a.DS_OBRA LIKE '%$q%' OR a.DS_DESCRITIVO LIKE '%$q%' OR a.DS_LOCAL LIKE '%$q%') ORDER BY $order $card, COD_OBRA DESC"; else: $sql = " SELECT a.*, b.DS_SEGMENTO FROM T_OBRA a LEFT JOIN T_OBRA_SEGMENTO b ON (a.COD_SEGMENTO_OBRA=b.COD_SEGMENTO_OBRA) ORDER BY $order $card, COD_OBRA DESC"; endif; $rs = $DB->PageExecute($sql,RECORDS_BY_PAGE,CURRENT_PAGE); if($rs->EOF): $recordsFound = 0; else: $recordsFound = $rs->_maxRecordCount; endif; if($card=="DESC"): $card_NEW = "ASC"; else: $card_NEW = "DESC"; endif; ?> <div id="pagination"> <?php $GenericEasyPagination =& new GenericEasyPagination(CURRENT_PAGE,RECORDS_BY_PAGE,"default"); $GenericEasyPagination -> setTotalRecords($recordsFound); $GenericEasyPagination -> setGetVars("act=show&card=$card&order=$order&q=$q"); print "<strong>".$recordsFound."</strong> registros encontrados."; print "<span style='display:inline;'>".$GenericEasyPagination->getComboNavigation("obras.php?act=show&card=$card&order=$order&q=$q")."</span>"; print "<span style='display:block;'>".$GenericEasyPagination->getNavigation()."</span>".chr(13); ?> </div> <?php if($recordsFound>0): ?> <table border="0" cellspacing="0" cellpadding="4" style="margin-top:10px; margin-left:auto; margin-right:auto;"> <tr> <td width="40" align="center" class="td_header"><a href="<?php print $_SERVER['PHP_SELF'];?>?act=show&card=<?php print $card_NEW;?>&q=<?php print $q;?>&order=FL_ATIVO">Status</a></td> <td width="50" align="center" class="td_header"><a href="<?php print $_SERVER['PHP_SELF'];?>?act=show&card=<?php print $card_NEW;?>&q=<?php print $q;?>&order=COD_OBRA"><img src="../img/ico-retweet.png" width="16" height="16" border="0"/></a></td> <td width="148" class="td_header"><a href="<?php print $_SERVER['PHP_SELF'];?>?act=show&card=<?php print $card_NEW;?>&q=<?php print $q;?>&order=DS_SEGMENTO">Segmento</a></td> <td width="186" class="td_header"><a href="<?php print $_SERVER['PHP_SELF'];?>?act=show&card=<?php print $card_NEW;?>&q=<?php print $q;?>&order=DS_OBRA">Título</a></td> <td width="173" align="center" class="td_header"><a href="<?php print $_SERVER['PHP_SELF'];?>?act=show&card=<?php print $card_NEW;?>&q=<?php print $q;?>&order=DT_ENTREGA">Data</a></td> <td width="222" align="center" class="td_header"><a href="#">Ações</a></td> </tr> <?php $bg = "td_clara"; while(!$rs->EOF): ?> <tr class="<?php print $bg;?>" onmouseover="this.className='td_ativo';" onmouseout="this.className='<?php print $bg;?>';"> <td align="center"><?php print fl_changestate($rs->fields['FL_ATIVO'], 'T_OBRA', 'FL_ATIVO', $rs->fields['COD_OBRA'], 'COD_OBRA');?></td> <td align="center"><?php print $rs->fields['COD_OBRA'];?></td> <td><?php print $rs->fields['DS_SEGMENTO'];?></td> <td><strong><?php print $rs->fields['DS_OBRA'];?></strong></td> <td align="center"><?php print date_br($rs->fields['DT_ENTREGA']);?></td> <td> <a href="obras.galeria-andamento.php?pai_id=<?php print $rs->fields['COD_OBRA'];?>&pai_tit=<?php print urlencode($rs->fields['DS_OBRA']);?>" title="Galeria de Fotos (Andamento)"><img src="../img/ico-fotos.png" alt="Galeria de Fotos (Andamento)" width="15" height="15" border="0" /></a> <a href="obras.galeria.php?pai_id=<?php print $rs->fields['COD_OBRA'];?>&pai_tit=<?php print urlencode($rs->fields['DS_OBRA']);?>" title="Galeria de Fotos"><img src="../img/ico-fotos_and.png" alt="Galeria de Fotos" width="16" height="14" border="0" /></a><img src="../img/spacer.gif" width="30" height="10" /> <?=$fl_img->fi_ChkFlagImg('DS_IMAGEM_MAIOR', 'T_OBRA', 'COD_OBRA', $rs->fields['COD_OBRA'], 'Imagem Maior (194 x 274)');?><img src="../img/spacer.gif" width="5" height="10" /> <?=$fl_img->fi_ChkFlagImg('DS_IMAGEM_MENOR', 'T_OBRA', 'COD_OBRA', $rs->fields['COD_OBRA'], 'Imagem Menor (126 x 264)');?><img src="../img/spacer.gif" width="5" height="10" /> <?=$fl_img->fi_ChkFlagImg('DS_IMAGEM_LOGO', 'T_OBRA', 'COD_OBRA', $rs->fields['COD_OBRA'], 'Logomarca (170 x 74)');?><img src="../img/spacer.gif" width="25" height="10" /> <a href="<?php print $_SERVER['PHP_SELF'];?>?act=form&id=<?php print $rs->fields['COD_OBRA'];?>"><img src="../img/ico-editar.gif" alt="Editar" width="15" height="15" hspace="2" border="0" /></a><img src="../img/spacer.gif" width="5" height="10" /> <a href="<?php print $_SERVER['PHP_SELF'];?>?a=1&opt=del&id=<?php print $rs->fields['COD_OBRA'];?>" onclick="return excluir();"><img src="../img/tab-excluir.gif" alt="Excluir" width="15" height="15" hspace="2" border="0" /></a> </td> </tr> <?php if($bg=="td_clara"): $bg = "td_escura"; else: $bg = "td_clara"; endif; $rs->MoveNext(); endwhile; ?> </table> <?php endif; ?> <?php endswitch; ?> </div> <?php require_once("../inc/htm.footer.php"); ?> </body> </html> O que pode estar errado no UPDATE: case 'upd': $sql = "UPDATE T_OBRA SET COD_SEGMENTO_OBRA=$segmento, DT_ENTREGA='".$data."', DS_OBRA='".$titulo."', DS_DESCRITIVO='".$descritivo."', DS_LOCAL='".$local."', DS_GOOGLE='".$google."', DS_CRONO='".$cronograma."', NR_LOCACAO='".$locacao."', NR_FUNDACAO='".$fundacao."', NR_ALVENARIA='".$alvenaria."', NR_ESTRUTURA='".$estrutura."', NR_PINTURA='".$pintura."', NR_CERAMICA='".$ceramica."', NR_ESQUADRIAS='".$esquadrias."', NR_INSTALACOES='".$instalacoes."', NR_ACABAMENTOS='".$acabamento."', NR_REVINTERNO='".$revesinterno."', NR_REVEXTERNO='".$revesexterno."', DT_CRONO_I='".$cronoi."', DT_CRONO_F='".$cronof."', FL_ATIVO='".$ativo."' WHERE (COD_OBRA=".$id.")"; $DB->Execute($sql); break; Compartilhar este post Link para o post Compartilhar em outros sites
Victor Cometti 8 Denunciar post Postado Maio 9, 2010 aparentemente num tem nada de errado n pode ter diferença no formato de sua data no banco e do jeito q você tá enviando. agora na sua classe o execute tem q v como q tá, quaando executar sua query use or die(mysql_error()) pra v o q esta acontecendo de errado Compartilhar este post Link para o post Compartilhar em outros sites
Matheus Brito 12 Denunciar post Postado Maio 9, 2010 A data não é uma string. Abs Compartilhar este post Link para o post Compartilhar em outros sites
maurohpg 0 Denunciar post Postado Maio 10, 2010 A data não é uma string. Abs Olá tudo beleza, então quando eu retiro a string cronoi e cronof ele grava ele da o Update, cronoi e cronof são datas. Percebi uma coisa: case 'upd': $sql = "UPDATE T_OBRA SET COD_SEGMENTO_OBRA='".$segmento."', DT_ENTREGA='".$data."', DS_OBRA='".$titulo."', DS_DESCRITIVO='".$descritivo."', DS_LOCAL='".$local."', DS_GOOGLE='".$google."', DS_CRONO='".$cronograma."', NR_LOCACAO='".$locacao."', NR_FUNDACAO='".$fundacao."', NR_ALVENARIA='".$alvenaria."', NR_ESTRUTURA='".$estrutura."', NR_PINTURA='".$pintura."', NR_CERAMICA='".$ceramica."', NR_ESQUADRIAS='".$esquadrias."', NR_INSTALACOES='".$instalacoes."', NR_ACABAMENTOS='".$acabamento."', NR_REVINTERNO='".$revesinterno."', NR_REVEXTERNO='".$revesexterno."', DT_CRONO_I='".$cronoi."', DT_CRONO_F='".$cronof."', FL_ATIVO='".$ativo."' WHERE (COD_OBRA=".$id.")"; $DB->Execute($sql) or die ("Houve erro na gravação dos dados!"); break; Quando eu tiro DT_CRONO_I='".$cronoi."' e DT_CRONO_F='".$cronof."' o update funciona, no caso são datas pode ser que eu esteja inserindo errado, mais estou inserindo das mesma forma o DT_ENTREGA='".$data."' e esse vai certinho não preciso tirar ele da consulta para funcionar o UPDATE e estou fazendo ambos iguais mais o cronoi e cronof não vai. Não estou intendendo oq ue pode ter errado. Compartilhar este post Link para o post Compartilhar em outros sites
Victor Cometti 8 Denunciar post Postado Maio 10, 2010 antes de $DB->Execute($sql) or die ("Houve erro na gravação dos dados!"); dá um echo echo $sql e veja se está certa a sua queryoutra coisa, todas as datas no banco estão com o mesmo tipo de dado (datetime, date ou timestamp) Compartilhar este post Link para o post Compartilhar em outros sites
maurohpg 0 Denunciar post Postado Maio 10, 2010 Dei uma verificada no meu código e vi que a tabela DT_CRONO_F na verdade era DT_CRONO_T por isso não estava dando o update, tirei essa tabela do update e funcionou asi fui dar uma olhada no banco vi que estava errada, falha minha. Problema revolvido. Obrigado a todos Compartilhar este post Link para o post Compartilhar em outros sites