|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-03-11 10:21 UTC] real_mctl at yahoo dot fr
It's simple, my entreprise updated the version of PHP, from 4.1.2 to 4.3.1. The problem is that when the function mysql_query is executing some query, this function overwrite all data on my PHP script even the query itself ! An example (the query is indeed correct) : $query = "select * from table" ; $result = @mysql_query($query,$idCnx) ; The execution of the query crashes, return 1 (don't return a ressource id) and owerwrite the content of $query to an empty value ! Thanks PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 16:00:01 2025 UTC |
<? function fSelectionnerNiveauSuivi(&$tabNiveauSuivi) { $succes=false; if ( ($idLienCnx=fConnecterBase(CONFIG_SUJET)) != false) // fConnecterBase() works properly, parses a constant who contains identifiers for the connection to the database { if (($resultat = fSelectNiveauSuivi($idLienCnx))!= false) { $succes=true; while ($ligne=mysql_fetch_object($resultat)) { $tabNiveauSuivi['idNiveauSuivi'][]=$ligne->idNiveauSuivi; $tabNiveauSuivi['nom'][]=$ligne->nom; } $succes = fLiberer($resultat,$succes); // fLiberer() free the memory (works properly) } $succes=fDeconnecterBase($idLienCnx,$succes); // fDeconnecterBase() close the connection with the base } return $succes ; } function fSelectNiveauSuivi($idLienCnx) { $requete="SELECT * FROM NiveauSuivi ORDER BY nom "; $resultat=fEmettreRequete($requete,$idLienCnx) ; return $resultat ; } function fEmettreRequete($requete,$idLienCnx) { // Emission de la requ?te $resultat = @mysql_query($requete,$idLienCnx); if ($resultat==false) { // Requ?te en erreur fEnregistrerErreur(mysql_errno(), mysql_error() . " Requete:" . $requete) ; // fEnregistrerErreur() mails the webmaster that an error occured when quering the database } // Retour return $resultat ; } $succes = fSelectionnerNiveauSuivi(&$tabNiveauSuivi) ; ?> OK ! The script works perfect with PHP 4.1.2 but with 4.3.1, it does not work One other detail : the functions listed above are in different include files and the include instruction is always called when necessary. After all, if I reload the page with the script, i have no problem Is this bogus again ?? Thanks