par
Xenon_54 » 15 mars 2005, 22:28
Je tente une réponse:
<?php
// Connexion MySQL
$db = mysql_connect('localhost', 'user', 'password');
mysql_select_db('database', $db);
// Sélection du champ
$sql = 'SELECT statut FROM info_tbl WHERE id=4';
if ($res = mysql_query($sql, $db)) {
// Récupération de la première ligne et du premier champ
list($statut) = mysql_fetch_row($res, $db);
// Vérification du OK
if ($statut == 'OK') {
include('ok.php');
} else {
include('pook.php');
}
}
// Fermeture de connexion MySQL
mysql_close($db);
?>
Est-ce bien cela que tu désirais faire?
J'ai supposé qu'il y avait un champ
id qui identifiait chacun des enregistrements dans ta table. À toi de modifier la condition si elle te ne plait pas.

Je tente une réponse:
[php]<?php
// Connexion MySQL
$db = mysql_connect('localhost', 'user', 'password');
mysql_select_db('database', $db);
// Sélection du champ
$sql = 'SELECT statut FROM info_tbl WHERE id=4';
if ($res = mysql_query($sql, $db)) {
// Récupération de la première ligne et du premier champ
list($statut) = mysql_fetch_row($res, $db);
// Vérification du OK
if ($statut == 'OK') {
include('ok.php');
} else {
include('pook.php');
}
}
// Fermeture de connexion MySQL
mysql_close($db);
?>[/php]
Est-ce bien cela que tu désirais faire?
J'ai supposé qu'il y avait un champ [b]id[/b] qui identifiait chacun des enregistrements dans ta table. À toi de modifier la condition si elle te ne plait pas.
;)