Bonjour,
Voici ce que j'ai comme version
UWamp (version portable de wamp)
php 5.4.31 ou bien 5.5.15
mysql 5.6.20
Quand je souhaite exécuter le code suivant :
Code "php : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 for ($i = 1 ; $i <= 1000; $i++) { try { //$bdd = new PDO("mysql:host=localhost;dbname=mabase;charset=utf8" , "root" , "root"); //$bdd = mysqli_connect("localhost","root","root","mabase"); //$bdd = new mysqli("localhost", "root", "root", "mabase"); //$bdd = new mysql("localhost", "root", "root", "mabase"); } catch (Exception $e) { die ('Erreur : '.$e->getMessage()); } $req = $bdd->query("select * from table_titi where champtoto=".$i." and champtoto2 like '' "); $donnees = $req->fetch(); if( /instruction ) { $data_out=$donnees[0].";".$donnees[1].";message type\r\n"; fputs($out, $data_out); }
Dans php_initial.ini et php_uwamp.ini , j'ai activé tous les param SQL.
A chaque fois j'ai des messages d'erreurs. PHP ne sait tout simplement pas exécuter de requête SQL
new pdo =mysqli_connect =Erreur : could not find drivernew mysql =Fatal error: Call to undefined function mysqli_connect()new mysqli =Fatal error: Class 'mysql' not foundMerci de m'aiguillerFatal error: Class 'mysqli' not found![]()
Partager