Jump to content


phfmiranda

Member Since 22/05/2008
Offline Last Active 03/05/2014, 09:02
-----

Topics I've Started

Programador Delphi

03/05/2014, 09:03

Contratamos desenvolvedor Delphi - Freelancer

Interessados enviar e-mail para: phfmiranda@hotmail.com

Contratamos Webdesigner

26/04/2014, 10:19

Bom dia,

Pessoal estamos precisando de um WebDesigner Freela para desenvolvimento de um WebSite.

Interessados favor enviar e-mail para: phfmiranda@hotmail.com

Favor também enviar: Trabalhos já realizados e referencias (Nome e Telefone)

Obrigado.

Contratamos Webdesigner

26/04/2014, 10:17

Bom dia,

Pessoal estamos precisando de um WebDesigner Freela para desenvolvimento de um WebSite.

Interessados favor enviar e-mail para: phfmiranda@hotmail.com

Favor também enviar: Trabalhos já realizados e referencias (Nome e Telefone)

Obrigado.

Erro Exibição Menor Que

30/03/2014, 14:17

Boa tarde pessoal,

Estou utilizando o seguinte comando em meu código PHP, porem fiz um teste e o mesmo não apresentou a mensagem conforme esperavamos.

Preciso que o código abaixo me mostre os itens que estão com a quantidade minima menor que a quantidade atual no BD, o que pode estar de errado neste código, pois fiz a alteraçao de um item e não me mostrou o resultado corretamente.

$query_Lista_Est_Minimo = "SELECT * FROM estoque WHERE qtd_minima < qtd_atual ORDER BY descricao ASC";

Obrigado pela ajuda.

Erro Em Pesquisa

25/11/2013, 12:40

Boa tarde pessoal,

Uso os código abaixo para fazer uma pesquisa em meu banco de dados, porem quando efetuamos a pesquisa e usamos algum acento, ou cedilha o sistema me envia para a tela de login, o que pode estar errado neste código?

Página de Pesquisa:

<?php require_once('../Connections/Conecta.php'); ?>
<?php require_once('../Connections/Restrito.php'); ?>
<!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="http://teste.com.br/css/layout.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="http://teste.com.br/css/content.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="http://teste.com.br/css/message.css" media="screen" />
<title>Untitled Document</title>
</head>

<body>
<form id="Pesquisa" name="Pesquisa" method="get" action="Resultado.php">
  <div align="center">
    <table border="0" align="left">
      <tr>
        <td width="48"><a href="Clientes.php"><img src="../Imagens/Novo.png" alt="Novo Cliente" width="48" height="48" border="0" /></a></td>
        <td width="48"><a href="Lista_Clientes.php"><img src="../Imagens/Listar.png" alt="Listar Clientes" width="48" height="48" border="0" /></a></td>
        <td width="48"><a href="Pesquisa_Cliente.php"><img src="../Imagens/Pesquisa.png" alt="Pesquisar" width="48" height="48" border="0" /></a></td>
        <td width="48"><a href="Caixa.php"><img src="../Imagens/Pasta.png" alt="Pastas" width="48" height="48" border="0" /></a></td>
        <td width="48"><img src="../Imagens/Imprimir.png" alt="Imprimir" width="48" height="48" onclick="window.print();"/></td>
      </tr>
    </table>
    <p>&nbsp;    </p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p><strong>Pesquisa de Clientes</strong></p>
    <p>
      <input name="busca" type="text" id="busca" size="60" />
      <input type="submit" name="Submit" value="Pesquisar" />
    </p>
</div>
</form>

  </body>
  </html>

Página do Resultado:

<?php require_once('../Connections/Conecta.php'); ?>
<?php require_once('../Connections/Restrito.php'); ?>
<?php
$colname_Mostra_Pesquisa = "-1";
if (isset($_GET['busca'])) {
  $colname_Mostra_Pesquisa = (get_magic_quotes_gpc()) ? $_GET['busca'] : addslashes($_GET['busca']);
}
mysql_select_db($database_Conecta, $Conecta);
$query_Mostra_Pesquisa = sprintf("SELECT * FROM clientes WHERE Nome LIKE '%%%s%%' ORDER BY Nome ASC", $colname_Mostra_Pesquisa);
$Mostra_Pesquisa = mysql_query($query_Mostra_Pesquisa, $Conecta) or die(mysql_error());
$row_Mostra_Pesquisa = mysql_fetch_assoc($Mostra_Pesquisa);
$totalRows_Mostra_Pesquisa = mysql_num_rows($Mostra_Pesquisa);

$colname_Lista_Clientes = "-1";
if (isset($_GET['codigo'])) {
  $colname_Lista_Clientes = (get_magic_quotes_gpc()) ? $_GET['codigo'] : addslashes($_GET['codigo']);
}
mysql_select_db($database_Conecta, $Conecta);
$query_Lista_Clientes = sprintf("SELECT * FROM clientes WHERE codigo = %s", $colname_Lista_Clientes);
$Lista_Clientes = mysql_query($query_Lista_Clientes, $Conecta) or die(mysql_error());
$row_Lista_Clientes = mysql_fetch_assoc($Lista_Clientes);
$totalRows_Lista_Clientes = mysql_num_rows($Lista_Clientes);
?>
<!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="http://teste.com.br/css/layout.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="http://teste.com.br/css/content.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="http://teste.com.br/css/message.css" media="screen" />
<title>Untitled Document</title>
</head>

<body>
<table border="0">
  <tr>
    <td><a href="Clientes.php"><img src="../Imagens/Novo.png" alt="Novo Cliente" width="48" height="48" border="0" /></a></td>
    <td><a href="Lista_Clientes.php"><img src="../Imagens/Listar.png" alt="Listar Clientes" width="48" height="48" border="0" /></a></td>
    <td><a href="Pesquisa_Cliente.php"><img src="../Imagens/Pesquisa.png" alt="Pesquisar" width="48" height="48" border="0" /></a></td>
    <td><img src="../Imagens/Imprimir.png" alt="Imprimir" width="48" height="48" onclick="window.print();"/></td>
  </tr>
</table>
</br>
<table width="100%" border="0">
  <tr>
    <td><strong>C&oacute;digo</strong></td>
    <td><strong>Nome</strong></td>
    <td><strong>Nome da M&atilde;e</strong></td>
    <td><strong>Cpf</strong></td>
    <td><strong>Telefone</strong></td>
    <td><strong>Celular</strong></td>
    <td colspan="2"><strong>Op&ccedil;&otilde;es</strong></td>
  </tr>
  <?php do { ?>
  
    <tr>
      <td><?php echo $row_Mostra_Pesquisa['codigo']; ?></td>
      <td><a href="Exibir_Cliente.php?codigo=<?php echo $row_Mostra_Pesquisa['codigo']; ?>"><?php echo $row_Mostra_Pesquisa['Nome']; ?></a></td>
      <td><?php echo $row_Mostra_Pesquisa['mae']; ?></td>
      <td><?php echo $row_Mostra_Pesquisa['Cpf']; ?></td>
      <td><?php echo $row_Mostra_Pesquisa['Telefone']; ?></td>
      <td><?php echo $row_Mostra_Pesquisa['Celular']; ?></td>
      <td align="center"><a href="Altera_cliente.php?codigo=<?php echo $row_Mostra_Pesquisa['codigo']; ?>"><img src="../Imagens/Editar.png" alt="Alterar" width="20" height="20" /></a></td>
      <td align="center"><a href="Deleta_cliente.php?codigo=<?php echo $row_Mostra_Pesquisa['codigo']; ?>"><img src="../Imagens/delete.gif" alt="Excluir Registro" width="20" height="20" /></a></td>
    </tr>
    <?php } while ($row_Mostra_Pesquisa = mysql_fetch_assoc($Mostra_Pesquisa)); ?>
</table>

<?php
mysql_free_result($Mostra_Pesquisa);

mysql_free_result($Lista_Clientes);
?>

O detalhe é o seguinte, quando fazemos a pesquisa usando o EasyPHP instalado em minha máquina não apresenta o erro, este erro somente apresenta no servidor online.

IPB Skin By Virteq