cobra176
Messages postés86Date d'inscriptionmercredi 1 novembre 2000StatutMembreDernière intervention21 janvier 2009
-
20 févr. 2007 à 10:53
Epoc22
Messages postés198Date d'inscriptionlundi 28 février 2005StatutMembreDernière intervention14 novembre 2008
-
20 févr. 2007 à 16:06
bonjour a tous
j'ai un probleme , j'ai un code qui me permet de recherche des informations contenu dans une seule table mais je veux recherche une informations dans toute la base mysql
voici mon code
<html>
<head>
</head>
<?php
$connect=mysql_connect("127.0.0.1", "root", "") or die ("Echec de la connexion au serveur !");
$select=mysql_select_db("base");
$query="select * from individu , appartenir where individu.nom_ind=appartenir_nom_ind";
$result=mysql_query($query);
$totenreg=mysql_num_rows($result);
if ($totenreg==0) // si il n'y a rien dans le champs de recherche
echo "<td colspan=9 align=center bgcolor='#000000'><h2>IL N'Y A PAS DE INDIVIDU A RECHERCHER</td>";
else if (!(empty($_POST["recherche"]))) // sinon il y a recherche
{
echo "\";
echo \"<h2>RECHERCHER INDIVIDU(S), \";
echo \"\";
echo \"----
\";
echo \"<h4 class='h41'>NOM, \";
$i=0;
while ($row=mysql_fetch_array($result))
{
if (stristr($row[$_POST[\"choix\"]], $_POST[\"recherche\"]))
{
if ($i==0)
{
echo \"----
\";
$i++;
}
else
{
echo \"----
\"; //affichage des informations de la base selon la recherche demander
$i--;
}
echo \"<h5>".$row["nom_ind"].", \";