Jump to content


Photo

Problema Com Insert


  • Faça o login para participar
3 replies to this topic

#1 webmastermichael

webmastermichael

    Novato no fórum

  • Usuários
  • 17 posts
  • Sexo:Masculino
  • Localidade:São Paulo

Posted 01/10/2008, 13:05

Meu problema e tenho uma tabela no meu banco e nessa tabela eu tenho um campo chamado arquivo e nele quando coloco s nesse campo meu código entrepreta de um modo e faz com que mande para outra página mas quando está em n fica armazenado o problema e o seguinte o código está funfando mandando tupo beleza o problema e que todos os campos ficam null mas grava o id o que esta acontecendo?????



código da página que faz um insert

<?php require_once('Connections/data.php'); ?><?php require_once('Connections/data.php'); ?><?php require_once('Connections/data.php'); ?><?php require_once('Connections/data.php'); ?><?phpif (!isset($_SESSION)) {  session_start();}$MM_authorizedUsers = "1";$MM_donotCheckaccess = "false";// *** Restrict Access To Page: Grant or deny access to this pagefunction isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {   // For security, start by assuming the visitor is NOT authorized.   $isValid = False;   // When a visitor has logged into this site, the Session variable MM_Username set equal to their username.   // Therefore, we know that a user is NOT logged in if that Session variable is blank.   if (!empty($UserName)) {     // Besides being logged in, you may restrict access to only certain users based on an ID established when they login.     // Parse the strings into arrays.     $arrUsers = Explode(",", $strUsers);     $arrGroups = Explode(",", $strGroups);     if (in_array($UserName, $arrUsers)) {       $isValid = true;     }     // Or, you may restrict access to only certain users based on their username.     if (in_array($UserGroup, $arrGroups)) {       $isValid = true;     }     if (($strUsers == "") && false) {       $isValid = true;     }   }   return $isValid; }$MM_restrictGoTo = "restrito.php";if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {     $MM_qsChar = "?";  $MM_referrer = $_SERVER['PHP_SELF'];  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";  if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)   $MM_referrer .= "?" . $QUERY_STRING;  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);  header("Location: ". $MM_restrictGoTo);   exit;}?><?phpif (!function_exists("GetSQLValueString")) {function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);  switch ($theType) {    case "text":      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      break;        case "long":    case "int":      $theValue = ($theValue != "") ? intval($theValue) : "NULL";      break;    case "double":      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";      break;    case "date":      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      break;    case "defined":      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;      break;  }  return $theValue;}}if (!function_exists("GetSQLValueString")) {function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);  switch ($theType) {    case "text":      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      break;        case "long":    case "int":      $theValue = ($theValue != "") ? intval($theValue) : "NULL";      break;    case "double":      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";      break;    case "date":      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      break;    case "defined":      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;      break;  }  return $theValue;}}$editFormAction = $_SERVER['PHP_SELF'];if (isset($_SERVER['QUERY_STRING'])) {  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);}if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {  $updateSQL = sprintf("UPDATE add_conta_pagar SET Funcionario=%s, banco=%s, Cliente=%s, Forma_pagamento=%s, descricao=%s, Data_pagamento=%s, Data_vencimento=%s, valor=%s, lancamento=%s, valor_pagamento=%s, documento=%s, Hora_Entrada=%s, Arquivo=%s WHERE Cod_Equipamento=%s",                       GetSQLValueString($_POST['Funcionario'], "text"),                       GetSQLValueString($_POST['banco'], "text"),                       GetSQLValueString($_POST['Cliente'], "text"),                       GetSQLValueString($_POST['Forma_pagamento'], "text"),                       GetSQLValueString($_POST['descricao'], "text"),                       GetSQLValueString($_POST['Data_pagamento'], "text"),                       GetSQLValueString($_POST['Data_vencimento'], "text"),                       GetSQLValueString($_POST['valor'], "text"),                       GetSQLValueString($_POST['lancamento'], "text"),                       GetSQLValueString($_POST['valor_pagamento'], "text"),                       GetSQLValueString($_POST['documento'], "text"),					   GetSQLValueString($_POST['Hora_Entrada'], "text"),					   GetSQLValueString($_POST['Arquivo'], "text"),					   GetSQLValueString($_POST['Cod_Equipamento'], "int"));  mysql_select_db($database_data, $data);  $Result1 = mysql_query($updateSQL, $data) or die(mysql_error());  $updateGoTo = "visualiza_conta.php";  if (isset($_SERVER['QUERY_STRING'])) {    $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";    $updateGoTo .= $_SERVER['QUERY_STRING'];  }  header(sprintf("Location: %s", $updateGoTo));}if (!function_exists("GetSQLValueString")) {function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);  switch ($theType) {    case "text":      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      break;        case "long":    case "int":      $theValue = ($theValue != "") ? intval($theValue) : "NULL";      break;    case "double":      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";      break;    case "date":      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      break;    case "defined":      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;      break;  }  return $theValue;}}if (!function_exists("GetSQLValueString")) {function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);  switch ($theType) {    case "text":      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      break;        case "long":    case "int":      $theValue = ($theValue != "") ? intval($theValue) : "NULL";      break;    case "double":      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";      break;    case "date":      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      break;    case "defined":      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;      break;  }  return $theValue;}}$maxRows_DetailRS1 = 10;$pageNum_DetailRS1 = 0;if (isset($_GET['pageNum_DetailRS1'])) {  $pageNum_DetailRS1 = $_GET['pageNum_DetailRS1'];}$startRow_DetailRS1 = $pageNum_DetailRS1 * $maxRows_DetailRS1;$colname_DetailRS1 = "-1";if (isset($_GET['recordID'])) {  $colname_DetailRS1 = $_GET['recordID'];}mysql_select_db($database_data, $data);$query_DetailRS1 = sprintf("SELECT * FROM add_conta_pagar WHERE Cod_Equipamento = %s", GetSQLValueString($colname_DetailRS1, "int"));$query_limit_DetailRS1 = sprintf("%s LIMIT %d, %d", $query_DetailRS1, $startRow_DetailRS1, $maxRows_DetailRS1);$DetailRS1 = mysql_query($query_limit_DetailRS1, $data) or die(mysql_error());$row_DetailRS1 = mysql_fetch_assoc($DetailRS1);if (isset($_GET['totalRows_DetailRS1'])) {  $totalRows_DetailRS1 = $_GET['totalRows_DetailRS1'];} else {  $all_DetailRS1 = mysql_query($query_DetailRS1);  $totalRows_DetailRS1 = mysql_num_rows($all_DetailRS1);}$totalPages_DetailRS1 = ceil($totalRows_DetailRS1/$maxRows_DetailRS1)-1;?><!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=utf-8" /><title>::: SISTEMA UBC CRIATIVE:::</title><script type=text/javascript>documentall = document.all;/** função para formatação de valores monetários retirada de* [url="http://jonasgalvez.com/br/blog/2003-08/egocentrismo"]http://jonasgalvez.com/br/blog/2003-08/egocentrismo[/url]*/function formatamoney© {    var t = this; if(c == undefined) c = 2;    var p, d = (t=t.split("."))[1].substr(0, c);    for(p = (t=t[0]).length; (p-=3) >= 1;) {	        t = t.substr(0,p) + "." + t.substr(p);    }    return t+"."+d+Array(c+1-d.length).join(0);}String.prototype.formatCurrency=formatamoneyfunction demaskvalue(valor, currency){/** Se currency é false, retorna o valor sem apenas com os números. Se é true, os dois últimos caracteres são considerados as* casas decimais*/var val2 = '';var strCheck = '0123456789';var len = valor.length;	if (len== 0){		return 0.00;	}	if (currency ==true){		/* Elimina os zeros à esquerda		* a variável  <i> passa a ser a localização do primeiro caractere após os zeros e		* val2 contém os caracteres (descontando os zeros à esquerda)		*/		for(var i = 0; i < len; i++)			if ((valor.charAt(i) != '0') && (valor.charAt(i) != ',')) break;		for(; i < len; i++){			if (strCheck.indexOf(valor.charAt(i))!=-1) val2+= valor.charAt(i);		}		if(val2.length==0) return "0.00";		if (val2.length==1)return "0.0" + val2;		if (val2.length==2)return "0." + val2;		var parte1 = val2.substring(0,val2.length-2);		var parte2 = val2.substring(val2.length-2);		var returnvalue = parte1 + "." + parte2;		return returnvalue;	}	else{			/* currency é false: retornamos os valores COM os zeros à esquerda,			* sem considerar os últimos 2 algarismos como casas decimais			*/			val3 ="";			for(var k=0; k < len; k++){				if (strCheck.indexOf(valor.charAt(k))!=-1) val3+= valor.charAt(k);			}	return val3;	}}function reais(obj,event){var whichCode = (window.Event) ? event.which : event.keyCode;/*Executa a formatação após o backspace nos navegadores !document.all*/if (whichCode == 8 && !documentall) {/*Previne a ação padrão nos navegadores*/	if (event.preventDefault){ //standart browsers			event.preventDefault();		}else{ // internet explorer			event.returnValue = false;	}	var valor = obj.value;	var x = valor.substring(0,valor.length-1);	obj.value= demaskvalue(x,true).formatCurrency();	return false;}/*Executa o Formata Reais e faz o format currency novamente após o backspace*/FormataReais(obj,'.',',',event);} // end reaisfunction backspace(obj,event){/*Essa função basicamente altera o  backspace nos input com máscara reais para os navegadores IE e opera.O IE não detecta o keycode 8 no evento keypress, por isso, tratamos no keydown.Como o opera suporta o infame document.all, tratamos dele na mesma parte do código.*/var whichCode = (window.Event) ? event.which : event.keyCode;if (whichCode == 8 && documentall) {	var valor = obj.value;	var x = valor.substring(0,valor.length-1);	var y = demaskvalue(x,true).formatCurrency();	obj.value =""; //necessário para o opera	obj.value += y;	if (event.preventDefault){ //standart browsers			event.preventDefault();		}else{ // internet explorer			event.returnValue = false;	}	return false;	}// end if}// end backspacefunction FormataReais(fld, milSep, decSep, e) {var sep = 0;var key = '';var i = j = 0;var len = len2 = 0;var strCheck = '0123456789';var aux = aux2 = '';var whichCode = (window.Event) ? e.which : e.keyCode;//if (whichCode == 8 ) return true; //backspace - estamos tratando disso em outra função no keydownif (whichCode == 0 ) return true;if (whichCode == 9 ) return true; //tecla tabif (whichCode == 13) return true; //tecla enterif (whichCode == 16) return true; //shift internet explorerif (whichCode == 17) return true; //control no internet explorerif (whichCode == 27 ) return true; //tecla escif (whichCode == 34 ) return true; //tecla endif (whichCode == 35 ) return true;//tecla endif (whichCode == 36 ) return true; //tecla home/*O trecho abaixo previne a ação padrão nos navegadores. Não estamos inserindo o caractere normalmente, mas via script*/if (e.preventDefault){ //standart browsers		e.preventDefault()	}else{ // internet explorer		e.returnValue = false}var key = String.fromCharCode(whichCode);  // Valor para o código da Chaveif (strCheck.indexOf(key) == -1) return false;  // Chave inválida/*Concatenamos ao value o keycode de key, se esse for um número*/fld.value += key;var len = fld.value.length;var bodeaux = demaskvalue(fld.value,true).formatCurrency();fld.value=bodeaux;/*Essa parte da função tão somente move o cursor para o final no opera. Atualmente não existe como movê-lo no konqueror.*/  if (fld.createTextRange) {    var range = fld.createTextRange();    range.collapse(false);    range.select();  }  else if (fld.setSelectionRange) {    fld.focus();    var length = fld.value.length;    fld.setSelectionRange(length, length);  }  return false;}</SCRIPT><link href="css/style.css" rel="stylesheet" type="text/css" /><script>function formatar(src, mask){  var i = src.value.length;  var saida = mask.substring(0,1);  var texto = mask.substring(i)if (texto.substring(0,1) != saida)  {        src.value += texto.substring(0,1);  }}</script><script language="JavaScript"><!--function muda(qual){uCase = qual.value.toUpperCase();qual.value = uCase;}--></script></head><body><table width="100%" border="0" cellpadding="0" cellspacing=" 0">  <tr>    <td width="64"><div align="center"><img src="Imagens/administrativo.jpg" alt="" width="64" height="64" /></div></td>    <td width="201"><b><span class="style7">Baixa do sistema</span><b><b><a href="fechar.php"></a></b></b></b></td>    <td width="1114"><img src="Imagens/fecha.jpg" width="34" height="33" /><b><b><b><a href="fechar.php">Fechar Janela</a></b></b></b></td>  </tr>  <tr>    <td>&nbsp;</td>    <td colspan="2"><table border="0" cellspacing="3" cellpadding="0" class="verdana" width="745" >      <form action="<?php echo $editFormAction;?>" method="POST" name="form1" id="form1">        <tr>          <td width="739" height="40" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">            <tr>              <td width="167" valign="top"><b>T&eacute;cnico:<br />                          <input name="Funcionario" type="text" id="Funcionario" value="<?php echo $_SESSION['MM_Username']; ?>" />                          <br />              </b></td>              <td width="959" valign="top"><b>Baixa no Cliente/fornecedor:<br />              </b>              <?php echo $row_DetailRS1['Cliente']; ?><br /></td>            </tr>          </table></td>        </tr>        <tr>          <td><table width="91%" border="0" cellspacing=" 0" cellpadding="0">            <tr>              <td width="23%"><b>Data do Pagamento:<br />              </b><?php echo $row_DetailRS1['Data_pagamento']; ?><br /></td>              <td width="23%"><b>Data do Vencimento:</b><br />                <?php echo $row_DetailRS1['Data_vencimento']; ?><br /></td>              <td width="17%"><b>Descrição:</b><br />                <?php echo $row_DetailRS1['descricao']; ?><b><br />                  </b></td>              <td width="19%"><b>Documento:</b><br />                <?php echo $row_DetailRS1['documento']; ?></td>              <td width="18%"><b>Valor:</b><br />                <?php echo $row_DetailRS1['valor']; ?></td>            </tr>          </table></td>        </tr>        <tr align="right">          <td height="35"><input name="Arquivo" type="hidden" id="Arquivo" value="s" />            <input name="Cod_Equipamento" type="hidden" id="Cod_Equipamento" value="<?php echo $row_DetailRS1['Cod_Equipamento']; ?>" />            <input type="submit" name="button" id="button" value=" Efetuar Cadastror" />            <input type="reset" name="button2" id="button2" value="Limpar Cadastro" /></td>        </tr>        <input type="hidden" name="MM_update" value="form1" />      </form>    </table>      </td>  </tr></table></body></html><?phpmysql_free_result($DetailRS1);?>


E o código de visualização do insert

<?php require_once('Connections/data.php'); ?><?phpif (!isset($_SESSION)) {  session_start();}$MM_authorizedUsers = "";$MM_donotCheckaccess = "true";// *** Restrict Access To Page: Grant or deny access to this pagefunction isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {   // For security, start by assuming the visitor is NOT authorized.   $isValid = False;   // When a visitor has logged into this site, the Session variable MM_Username set equal to their username.   // Therefore, we know that a user is NOT logged in if that Session variable is blank.   if (!empty($UserName)) {     // Besides being logged in, you may restrict access to only certain users based on an ID established when they login.     // Parse the strings into arrays.     $arrUsers = Explode(",", $strUsers);     $arrGroups = Explode(",", $strGroups);     if (in_array($UserName, $arrUsers)) {       $isValid = true;     }     // Or, you may restrict access to only certain users based on their username.     if (in_array($UserGroup, $arrGroups)) {       $isValid = true;     }     if (($strUsers == "") && true) {       $isValid = true;     }   }   return $isValid; }$MM_restrictGoTo = "index.php";if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {     $MM_qsChar = "?";  $MM_referrer = $_SERVER['PHP_SELF'];  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";  if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)   $MM_referrer .= "?" . $QUERY_STRING;  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);  header("Location: ". $MM_restrictGoTo);   exit;}?><?phpif (!function_exists("GetSQLValueString")) {function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);  switch ($theType) {    case "text":      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      break;        case "long":    case "int":      $theValue = ($theValue != "") ? intval($theValue) : "NULL";      break;    case "double":      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";      break;    case "date":      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      break;    case "defined":      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;      break;  }  return $theValue;}}$maxRows_Recordset1 = 30;$pageNum_Recordset1 = 0;if (isset($_GET['pageNum_Recordset1'])) {  $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];}$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;mysql_select_db($database_data, $data);$query_Recordset1 = "SELECT * FROM add_conta_pagar WHERE Arquivo = 's'";$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);$Recordset1 = mysql_query($query_limit_Recordset1, $data) or die(mysql_error());$row_Recordset1 = mysql_fetch_assoc($Recordset1);if (isset($_GET['totalRows_Recordset1'])) {  $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];} else {  $all_Recordset1 = mysql_query($query_Recordset1);  $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);}$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;$currentPage = $_SERVER["PHP_SELF"];$queryString_Recordset1 = "";if (!empty($_SERVER['QUERY_STRING'])) {  $params = explode("&", $_SERVER['QUERY_STRING']);  $newParams = array();  foreach ($params as $param) {    if (stristr($param, "pageNum_Recordset1") == false &&         stristr($param, "totalRows_Recordset1") == false) {      array_push($newParams, $param);    }  }  if (count($newParams) != 0) {    $queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams));  }}$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1);?><!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=utf-8" /><title>Visualização</title><link href="css/style.css" rel="stylesheet" type="text/css" /><style type="text/css"><!--.style1 {color: #337B93}--></style></head><body><table width="100%" border="0" cellpadding="0" cellspacing=" 0">  <tr>    <td width="15"><div align="center"><img src="Imagens/cadeado.gif" alt="" width="30" height="30" /></div></td>    <td><strong>Contas Pagas - <b><b><a href="fechar.php">Fechar Janela</a></b></b></strong></td>  </tr>  <tr>    <td>&nbsp;</td>    <td><table width="100%" border="0" align="center">        <tr bgcolor="#f0f0f0">          <td>Número do Registro</td>          <td>Funcionario</td>          <td>Data do Pagamento</td>          <td>Data do Vencimento</td>          <td>Valor</td>        </tr>        <?php do { ?>          <tr>            <td bgcolor="dbdada"><a href="fechar.php" target="_self" class="style1"> <?php echo $row_Recordset1['Cod_Equipamento']; ?></a> </td>            <td bgcolor="dbdada"><span class="style1"><?php echo $row_Recordset1['Funcionario']; ?></span>&nbsp; </td>            <td bgcolor="dbdada"><span class="style1"><?php echo $row_Recordset1['Data_pagamento']; ?></span>&nbsp; </td>            <td bgcolor="dbdada"><span class="style1"><?php echo $row_Recordset1['Data_vencimento']; ?></span>&nbsp; </td>            <td bgcolor="dbdada"><span class="style1"><?php echo $row_Recordset1['valor_pagamento']; ?></span>&nbsp; </td>          </tr><?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>            </table>       <table border="0">        <tr>          <td><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>              <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, 0, $queryString_Recordset1); ?>"><img src="Imagens/First.gif" border="0" /></a>          <?php } // Show if not first page ?>          </td>      <td><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>          <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0, $pageNum_Recordset1 - 1), $queryString_Recordset1); ?>"><img src="Imagens/Previous.gif" border="0" /></a>          <?php } // Show if not first page ?>        </td>      <td><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>          <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>"><img src="Imagens/Next.gif" border="0" /></a>          <?php } // Show if not last page ?>        </td>      <td><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>          <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, $totalPages_Recordset1, $queryString_Recordset1); ?>"><img src="Imagens/Last.gif" border="0" /></a>          <?php } // Show if not last page ?>        </td>    </tr>      </table></td>  </tr></table><p>&nbsp;</p><p>&nbsp;</p></body></html><?phpmysql_free_result($Recordset1);?>

Socorro ae gente só falta isso para eu terminar o sistema da empresa me ajudemmmmmmmmm!!!!!!!!!!! obrigado ae galera!!. :wacko: :wacko: :blink:

#2 Maykel Esser

Maykel Esser

    Super Veterano

  • Usuários
  • 1536 posts
  • Sexo:Masculino
  • Localidade:Curitiba - PR

Posted 01/10/2008, 15:30

cara, reorganiza esse código. Está monstruoso pra pouca coisa!

Só na primeira página já vi 4 conexões. Dê uma revisada e mande o código um pouco mais organizado pra gente dar uma olhada (y)

Se este post lhe ajudou, ajude o fórum também. Use a reputação de mensagens! add.png


#3 webmastermichael

webmastermichael

    Novato no fórum

  • Usuários
  • 17 posts
  • Sexo:Masculino
  • Localidade:São Paulo

Posted 01/10/2008, 16:25

vlw velho eu achei o erro eu tava mandando exibir o código <?php echo $row_DetailRS1['valor_d']; ?> fora de um text fild quando mandava o banco não achava por que eu tava só mandando exibir o código.... vlw fórum web master o que ajudo mesmo foi revisar o código rsrsrrsrsrsrsrs :boxing: :boxing: :boxing: :boxing: :boxing:

#4 marcuseduado

marcuseduado

    Normal

  • Usuários
  • 61 posts
  • Sexo:Não informado

Posted 01/10/2008, 23:17

Coloca um "RESOLVIDO" ai [;)]
Mentes GRANDES discutem idéias, mentes pequenas discutem pessoas.




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq