Jump to content
Fórum Script Brasil
  • 0

PHP ODBC QUERY APACHE STOP


Rhandy
 Share

Question

Oi!

 

Tenho um erro muito estranho que ainda não consegui entender.

Tenho uma base de dados com tabelas em paradox. Uso uma DSN de sistema em windows para ligar à base de dados.

Executo o mesmo código "simples" em para tabelas diferentes, e em algumas tabelas o Apache deixa de funcionar.

 

<?php
error_reporting(E_ALL);
ini_set('display_errors', '1'); // se estiver com valor '1' exibe todos os erros do php, com valor '0' não exibe

//LIGA A BASE DE DADOS
$liga=odbc_connect("wcartseg","","");
#######################################################################################################

//echo " seleccionei a base de dados";
//Select necessario para primeiro encontrar o cliente e companhia
    
    
//echo '<pre>'; print_r($tabela); echo '</pre>';
$sql = "select * from Tabela1 WHERE Id=55";
echo $sql . "</br>";
$resultado = odbc_exec($liga,$sql );
odbc_fetch_row($resultado, 0);
$registo_ap = odbc_fetch_array($resultado);//devolve o array de resultados da pesquisa na tabela das apolices

while($registo_ap = odbc_fetch_array($resultado)){
    
    echo '<pre>'; print_r($registo_ap); echo '</pre>';
    echo $registo_ap['Recibo'];
    echo"<br>";
}

 // Free Result
  odbc_free_result($resultado);

  // Close Connection
  odbc_close($liga);


######################################################################################################

?>

 

 

 

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Forum Statistics

    • Total Topics
      149.6k
    • Total Posts
      646.2k
×
×
  • Create New...