Infos de plusieurs tables MySQL en même temps

Eléphant du PHP | 51 Messages

30 oct. 2008, 11:11

Salut,

Pour mon site CiaoBlog, j'ai faite cette requête SQL:

Code : Tout sélectionner

SELECT * FROM blogs, utilisateurs WHERE blogs.utilisateurID = utilisateurs.ID ORDER BY utilisateurs.pseudo DESC
Elle me permets de sélectionner tous les blogs du site et en même temps de prendre les noms des créateurs des blogs. Seulement, cette requête ne me retourne qu'un seul résultat! Ou est le problème???

Voici la structure de mes tables:
Blogs:

Code : Tout sélectionner

CREATE TABLE `blogs` ( `ID` bigint(20) NOT NULL auto_increment, `utilisateurID` bigint(20) NOT NULL default '0', `titre` varchar(100) NOT NULL default '', `date_creation` varchar(10) NOT NULL default '', `description` text NOT NULL, `langue` char(2) NOT NULL default 'fr', `publicite` char(3) NOT NULL default 'on', `votes` char(2) NOT NULL default '2', PRIMARY KEY (`ID`), UNIQUE KEY `ID` (`ID`) ) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 COMMENT='Table qui stocke les blogs' AUTO_INCREMENT=9 ;
Utilisateurs:

Code : Tout sélectionner

CREATE TABLE `utilisateurs` ( `ID` bigint(20) NOT NULL auto_increment, `pseudo` varchar(100) NOT NULL default '', `pass` varchar(30) NOT NULL default '', `rang` varchar(100) NOT NULL default 'normal', `mail` varchar(100) NOT NULL default '', `date_naissance` varchar(10) NOT NULL default '', `date_inscription` varchar(10) NOT NULL default '', PRIMARY KEY (`ID`), UNIQUE KEY `ID` (`ID`,`mail`) ) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1 COMMENT='Comptes des utilisateurs' AUTO_INCREMENT=11 ;
Damien
La bave du crapaud n'atteinds pas la blanche colombe.
Site principal: CiaoNetwork
http://blog.ciaonetwork.com

Eléphant du PHP | 396 Messages

30 oct. 2008, 13:37

C'est le traitement PHP qui semble être en cause pas la requête qui est correcte.
Comment traites-tu ce que retourne la requête?

Eléphant du PHP | 51 Messages

30 oct. 2008, 15:22

Je fais ça

Code : Tout sélectionner

<div id="main"> <?php do { ?> <h1><?php echo $row_rsListe['titre']; ?></h1> <p class="post-by">cr&eacute;&eacute; par <?php echo $row_rsListe['pseudo']; ?> le <?php echo $row_rsListe['date_creation']; ?></p> <p><?php echo nl2br($row_rsListe['description']); ?></p> <p class="post-footer"> <a href="blog.php?ID=<?php echo $row_rsListe['_ID']; ?>" class="readmore">Voir ce blog</a> | La langue de ce blog est <?php echo $row_rsListe['langue']; ?></p> <?php } while ($row_rsListe = mysql_fetch_assoc($rsListe)); ?></div>
La bave du crapaud n'atteinds pas la blanche colombe.
Site principal: CiaoNetwork
http://blog.ciaonetwork.com

Avatar du membre
ViPHP
ViPHP | 3008 Messages

30 oct. 2008, 15:26

Et ta requête directement sous phpmyadmin te donne des résultats ?

Eléphant du PHP | 51 Messages

30 oct. 2008, 15:30

Elle me donne toute la liste bien comme il faut!
La bave du crapaud n'atteinds pas la blanche colombe.
Site principal: CiaoNetwork
http://blog.ciaonetwork.com

Avatar du membre
ViPHP
ViPHP | 3008 Messages

30 oct. 2008, 15:34

Donnes nous le code complet du traitement, là on a que la boucle.

Eléphant du PHP | 51 Messages

30 oct. 2008, 16:23

En prime, tout le code de toute la page:
<?php require_once('Connections/blogs.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$maxRows_rsTopFlop = 5;
$pageNum_rsTopFlop = 0;
if (isset($_GET['pageNum_rsTopFlop'])) {
  $pageNum_rsTopFlop = $_GET['pageNum_rsTopFlop'];
}
$startRow_rsTopFlop = $pageNum_rsTopFlop * $maxRows_rsTopFlop;

mysql_select_db($database_blogs, $blogs);
$query_rsTopFlop = "SELECT _ID, titre, votes FROM blogs ORDER BY votes DESC";
$query_limit_rsTopFlop = sprintf("%s LIMIT %d, %d", $query_rsTopFlop, $startRow_rsTopFlop, $maxRows_rsTopFlop);
$rsTopFlop = mysql_query($query_limit_rsTopFlop, $blogs) or die(mysql_error());
$row_rsTopFlop = mysql_fetch_assoc($rsTopFlop);

if (isset($_GET['totalRows_rsTopFlop'])) {
  $totalRows_rsTopFlop = $_GET['totalRows_rsTopFlop'];
} else {
  $all_rsTopFlop = mysql_query($query_rsTopFlop);
  $totalRows_rsTopFlop = mysql_num_rows($all_rsTopFlop);
}
$totalPages_rsTopFlop = ceil($totalRows_rsTopFlop/$maxRows_rsTopFlop)-1;

mysql_select_db($database_blogs, $blogs);
$query_rsParts = "SELECT ID, site, titre FROM partenaires ORDER BY titre ASC";
$rsParts = mysql_query($query_rsParts, $blogs) or die(mysql_error());
$row_rsParts = mysql_fetch_assoc($rsParts);
$totalRows_rsParts = mysql_num_rows($rsParts);

mysql_select_db($database_blogs, $blogs);
$query_rsListe = "SELECT * FROM blogs, utilisateurs WHERE blogs.utilisateurID = utilisateurs.ID AND blogs.utilisateurID = '2' ORDER BY utilisateurs.pseudo DESC";
$rsListe = mysql_query($query_rsListe, $blogs) or die(mysql_error());
$row_rsListe = mysql_fetch_assoc($rsListe);
$totalRows_rsListe = mysql_num_rows($rsListe);

mysql_select_db($database_blogs, $blogs);
$query_rsListe2 = "SELECT * FROM blogs";
$rsListe2 = mysql_query($query_rsListe2, $blogs) or die(mysql_error());
$row_rsListe2 = mysql_fetch_assoc($rsListe2);
$totalRows_rsListe2 = mysql_num_rows($rsListe2);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"><!-- InstanceBegin template="/Templates/liste.dwt.php" codeOutsideHTMLIsLocked="false" -->

<head>

<meta name="Description" content="Information architecture, Web Design, Web Standards." />
<meta name="Keywords" content="your, keywords" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Distribution" content="Global" />
<meta name="Author" content="Erwin Aligam - [email protected]" />
<meta name="Robots" content="index,follow" />

<link rel="stylesheet" href="css/MarketPlace.css" type="text/css" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>CiaoBlog - Liste des blogs</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>

<body>

<!-- wrap starts here -->
<div id="wrap">

	<!--header -->
	<div id="header">			
				
		<div id="header-links">
		<p>
			<a href="index.php">Accueil</a> | 
			<a href="index.php">Contact</a></p>		
	  </div>		
		
	<!--header ends-->					
	</div>
		
	<div id="header-photo">
	
		<h1 id="logo-text"><a href="index.php" title="">ciaoblog</a></h1>		
		</div>
	<!-- navigation starts-->	
	<div  id="nav">
		<ul>
		  <li><a href="index.php">accueil</a></li>
		  <li id="current"><a href="liste.php">Coin Blog</a></li>			
		  <li><a href="membres/login.php">Zone Membre</a></li>		
	  </ul>
	<!-- navigation ends-->	
	</div>					
			
	<!-- content-wrap starts -->
	<div id="content-wrap" class="three-col"  >	
	
		<div id="sidebar">
			
			<h1>Recherche un blog</h1>	
			<form action="recherche.php" class="searchform" id="recherche">
			  <p>
			    <input name="search_query" class="textbox" type="text" />
			    <input name="search" class="button" value="Cherche" type="submit" />
				</p>			
		  </form>	
					
		  <h1>Cr&eacute;er ton blog</h1>
		  <p><a href="membres/register.php">Clique ici pour cr&eacute;er ton blog</a></p>
		  <h1>Les 5 meilleurs blogs</h1>
<ul class="sidemenu">				
				<?php do { ?>
				  <li><a href="blog.php?ID=<?php echo $row_rsTopFlop['_ID']; ?>" title="<?php echo $row_rsTopFlop['votes']; ?> votes"><?php echo $row_rsTopFlop['titre']; ?></a></li>
		  <?php } while ($row_rsTopFlop = mysql_fetch_assoc($rsTopFlop)); ?></ul>	
				
		  <h1>Partenaires</h1>
			<ul class="sidemenu">
				<?php do { ?>
				  <li><a href="<?php echo $row_rsParts['site']; ?>" title="<?php echo $row_rsParts['description']; ?>"><?php echo $row_rsParts['titre']; ?></a></li>
		  <?php } while ($row_rsParts = mysql_fetch_assoc($rsParts)); ?></ul>

		  <!-- sidebar ends -->		
		</div>
		
		<div id="rightcolumn">
		
			<h1>C'est quoi  un blog?</h1>
			<p align="left">Un blog est un site web constitu&eacute; par la r&eacute;union d' articles agglom&eacute;r&eacute;s au fil du temps, et class&eacute;s par ordre  ant&eacute;chronologique . Chaque article est, &agrave; l'image d'un journal de bord ou d'un journal intime, un ajout au blog&nbsp;; le <em>blogueur</em> (celui qui tient le blog) y d&eacute;livre un contenu souvent textuel, enrichi de liens et d'&eacute;l&eacute;ments multim&eacute;dias.<br />
			</p>
			    <p align="right"><em>source: Wikip&eacute;dia</em></p>
			
			<h1>Pourquoi  un blog?</h1>
		    <p>Un blog permet de partager, discuter ou d&eacute;battre avec ceux qui vous importent.</p>			
	        <p>Un blog est une solution simple et efficace pour vous assurer une visibilit&eacute; professionnelle sur internet &agrave; moindre co&ucirc;t.</p>
            <p>Un blog est un tremplin pour une meilleure visibilit&eacute; sur le net.</p>
      </div>
		
		
		<!-- InstanceBeginEditable name="contenu" -->
		<div id="main">
          <?php do { ?>
          <h1><?php echo $row_rsListe['titre']; ?></h1>
          <p class="post-by">cr&eacute;&eacute; par <?php echo $row_rsListe['pseudo']; ?> le <?php echo $row_rsListe['date_creation']; ?></p>
          <p><?php echo nl2br($row_rsListe['description']); ?></p>
          <p class="post-footer"> <a href="blog.php?ID=<?php echo $row_rsListe['_ID']; ?>" class="readmore">Voir ce blog</a> | La langue de ce blog est <?php echo $row_rsListe['langue']; ?></p>
           <?php } while ($row_rsListe2 = mysql_fetch_assoc($rsListe2)); ?></div>
 		<!-- InstanceEndEditable -->
		<!-- content-wrap ends-->	
	</div>
<!-- footer starts -->			
	<div id="footer-wrap"><div id="footer">				
			
			<p>
			&copy; 2008 <strong><a href="http://www.ciaonetwork.com">CiaoNetwork</a></strong> | 
			Design par: <a href="http://www.styleshout.com/">styleshout</a> | 
			Valid <a href="http://validator.w3.org/check?uri=referer">XHTML</a> | 
			<a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>
			
   		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			
			<a href="index.php">Accueil</a>&nbsp;|&nbsp;
   		<a href="index.php">Plan du site</a></p>		
			
	</div></div>
	<!-- footer ends-->	
	
<!-- wrap ends here -->
</div>

</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($rsTopFlop);

mysql_free_result($rsParts);

mysql_free_result($rsListe);

mysql_free_result($rsListe2);
?>
La bave du crapaud n'atteinds pas la blanche colombe.
Site principal: CiaoNetwork
http://blog.ciaonetwork.com

Avatar du membre
ViPHP
ViPHP | 3008 Messages

30 oct. 2008, 16:29

<!-- InstanceBeginEditable name="contenu" --> 
      <div id="main"> 
          <?php do { ?> 
          <h1><?php echo $row_rsListe['titre']; ?></h1> 
          <p class="post-by">cr&eacute;&eacute; par <?php echo $row_rsListe['pseudo']; ?> le <?php echo $row_rsListe['date_creation']; ?></p> 
          <p><?php echo nl2br($row_rsListe['description']); ?></p> 
          <p class="post-footer"> <a href="blog.php?ID=<?php echo $row_rsListe['_ID']; ?>" class="readmore">Voir ce blog</a> | La langue de ce blog est <?php echo $row_rsListe['langue']; ?></p> 
           <?php } while ($row_rsListe2 = mysql_fetch_assoc($rsListe2)); ?></div> 
       <!-- InstanceEndEditable -->
$row_rsListe2 ou $row_rsListe ?

Eléphant du PHP | 51 Messages

30 oct. 2008, 16:50

Désolé c'était la mauvaise version mais ça change rien!

=> Voici l'url de la page: http://blog.ciaonetwork.com/liste.php
La bave du crapaud n'atteinds pas la blanche colombe.
Site principal: CiaoNetwork
http://blog.ciaonetwork.com

Avatar du membre
ViPHP
ViPHP | 3008 Messages

30 oct. 2008, 17:35

Heu...l'url ne nous aide pas trop là. C'est quoi ton "vrai" code ?

Eléphant du PHP | 51 Messages

30 oct. 2008, 21:53

Mon code c'est ça:
<?php require_once('Connections/blogs.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$maxRows_rsTopFlop = 5;
$pageNum_rsTopFlop = 0;
if (isset($_GET['pageNum_rsTopFlop'])) {
  $pageNum_rsTopFlop = $_GET['pageNum_rsTopFlop'];
}
$startRow_rsTopFlop = $pageNum_rsTopFlop * $maxRows_rsTopFlop;

mysql_select_db($database_blogs, $blogs);
$query_rsTopFlop = "SELECT _ID, titre, votes FROM blogs ORDER BY votes DESC";
$query_limit_rsTopFlop = sprintf("%s LIMIT %d, %d", $query_rsTopFlop, $startRow_rsTopFlop, $maxRows_rsTopFlop);
$rsTopFlop = mysql_query($query_limit_rsTopFlop, $blogs) or die(mysql_error());
$row_rsTopFlop = mysql_fetch_assoc($rsTopFlop);

if (isset($_GET['totalRows_rsTopFlop'])) {
  $totalRows_rsTopFlop = $_GET['totalRows_rsTopFlop'];
} else {
  $all_rsTopFlop = mysql_query($query_rsTopFlop);
  $totalRows_rsTopFlop = mysql_num_rows($all_rsTopFlop);
}
$totalPages_rsTopFlop = ceil($totalRows_rsTopFlop/$maxRows_rsTopFlop)-1;

mysql_select_db($database_blogs, $blogs);
$query_rsParts = "SELECT ID, site, titre FROM partenaires ORDER BY titre ASC";
$rsParts = mysql_query($query_rsParts, $blogs) or die(mysql_error());
$row_rsParts = mysql_fetch_assoc($rsParts);
$totalRows_rsParts = mysql_num_rows($rsParts);

mysql_select_db($database_blogs, $blogs);
$query_rsListe = "SELECT * FROM blogs, utilisateurs WHERE blogs.utilisateurID = utilisateurs.ID AND blogs.utilisateurID = '2' ORDER BY utilisateurs.pseudo DESC";
$rsListe = mysql_query($query_rsListe, $blogs) or die(mysql_error());
$row_rsListe = mysql_fetch_assoc($rsListe);
$totalRows_rsListe = mysql_num_rows($rsListe);

mysql_select_db($database_blogs, $blogs);
$query_rsListe2 = "SELECT * FROM blogs";
$rsListe2 = mysql_query($query_rsListe2, $blogs) or die(mysql_error());
$row_rsListe2 = mysql_fetch_assoc($rsListe2);
$totalRows_rsListe2 = mysql_num_rows($rsListe2);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"><!-- InstanceBegin template="/Templates/liste.dwt.php" codeOutsideHTMLIsLocked="false" -->

<head>

<meta name="Description" content="Information architecture, Web Design, Web Standards." />
<meta name="Keywords" content="your, keywords" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Distribution" content="Global" />
<meta name="Author" content="Erwin Aligam - [email protected]" />
<meta name="Robots" content="index,follow" />

<link rel="stylesheet" href="css/MarketPlace.css" type="text/css" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>CiaoBlog - Liste des blogs</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>

<body>

<!-- wrap starts here -->
<div id="wrap">

	<!--header -->
	<div id="header">			
				
		<div id="header-links">
		<p>
			<a href="index.php">Accueil</a> | 
			<a href="index.php">Contact</a></p>		
	  </div>		
		
	<!--header ends-->					
	</div>
		
	<div id="header-photo">
	
		<h1 id="logo-text"><a href="index.php" title="">ciaoblog</a></h1>		
		</div>
	<!-- navigation starts-->	
	<div  id="nav">
		<ul>
		  <li><a href="index.php">accueil</a></li>
		  <li id="current"><a href="liste.php">Coin Blog</a></li>			
		  <li><a href="membres/login.php">Zone Membre</a></li>		
	  </ul>
	<!-- navigation ends-->	
	</div>					
			
	<!-- content-wrap starts -->
	<div id="content-wrap" class="three-col"  >	
	
		<div id="sidebar">
			
			<h1>Recherche un blog</h1>	
			<form action="recherche.php" class="searchform" id="recherche">
			  <p>
			    <input name="search_query" class="textbox" type="text" />
			    <input name="search" class="button" value="Cherche" type="submit" />
				</p>			
		  </form>	
					
		  <h1>Cr&eacute;er ton blog</h1>
		  <p><a href="membres/register.php">Clique ici pour cr&eacute;er ton blog</a></p>
		  <h1>Les 5 meilleurs blogs</h1>
<ul class="sidemenu">				
				<?php do { ?>
				  <li><a href="blog.php?ID=<?php echo $row_rsTopFlop['_ID']; ?>" title="<?php echo $row_rsTopFlop['votes']; ?> votes"><?php echo $row_rsTopFlop['titre']; ?></a></li>
		  <?php } while ($row_rsTopFlop = mysql_fetch_assoc($rsTopFlop)); ?></ul>	
				
		  <h1>Partenaires</h1>
			<ul class="sidemenu">
				<?php do { ?>
				  <li><a href="<?php echo $row_rsParts['site']; ?>" title="<?php echo $row_rsParts['description']; ?>"><?php echo $row_rsParts['titre']; ?></a></li>
		  <?php } while ($row_rsParts = mysql_fetch_assoc($rsParts)); ?></ul>

		  <!-- sidebar ends -->		
		</div>
		
		<div id="rightcolumn">
		
			<h1>C'est quoi  un blog?</h1>
			<p align="left">Un blog est un site web constitu&eacute; par la r&eacute;union d' articles agglom&eacute;r&eacute;s au fil du temps, et class&eacute;s par ordre  ant&eacute;chronologique . Chaque article est, &agrave; l'image d'un journal de bord ou d'un journal intime, un ajout au blog&nbsp;; le <em>blogueur</em> (celui qui tient le blog) y d&eacute;livre un contenu souvent textuel, enrichi de liens et d'&eacute;l&eacute;ments multim&eacute;dias.<br />
			</p>
			    <p align="right"><em>source: Wikip&eacute;dia</em></p>
			
			<h1>Pourquoi  un blog?</h1>
		    <p>Un blog permet de partager, discuter ou d&eacute;battre avec ceux qui vous importent.</p>			
	        <p>Un blog est une solution simple et efficace pour vous assurer une visibilit&eacute; professionnelle sur internet &agrave; moindre co&ucirc;t.</p>
            <p>Un blog est un tremplin pour une meilleure visibilit&eacute; sur le net.</p>
      </div>
		
		
		<!-- InstanceBeginEditable name="contenu" -->
		<div id="main">
          <?php do { ?>
          <h1><?php echo $row_rsListe['titre']; ?></h1>
          <p class="post-by">cr&eacute;&eacute; par <?php echo $row_rsListe['pseudo']; ?> le <?php echo $row_rsListe['date_creation']; ?></p>
          <p><?php echo nl2br($row_rsListe['description']); ?></p>
          <p class="post-footer"> <a href="blog.php?ID=<?php echo $row_rsListe['_ID']; ?>" class="readmore">Voir ce blog</a> | La langue de ce blog est <?php echo $row_rsListe['langue']; ?></p>
           <?php } while ($row_rsListe = mysql_fetch_assoc($rsListe)); ?></div>
 		<!-- InstanceEndEditable -->
		<!-- content-wrap ends-->	
	</div>
<!-- footer starts -->			
	<div id="footer-wrap"><div id="footer">				
			
			<p>
			&copy; 2008 <strong><a href="http://www.ciaonetwork.com">CiaoNetwork</a></strong> | 
			Design par: <a href="http://www.styleshout.com/">styleshout</a> | 
			Valid <a href="http://validator.w3.org/check?uri=referer">XHTML</a> | 
			<a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>
			
   		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			
			<a href="index.php">Accueil</a>&nbsp;|&nbsp;
   		<a href="index.php">Plan du site</a></p>		
			
	</div></div>
	<!-- footer ends-->	
	
<!-- wrap ends here -->
</div>

</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($rsTopFlop);

mysql_free_result($rsParts);

mysql_free_result($rsListe);

mysql_free_result($rsListe2);
?>
La bave du crapaud n'atteinds pas la blanche colombe.
Site principal: CiaoNetwork
http://blog.ciaonetwork.com

Avatar du membre
ViPHP
ViPHP | 3008 Messages

30 oct. 2008, 23:40

A quoi correspond blogs.utilisateurID = '2' dans ta requête ?

La requête qui donne un résultat est celle qui de ton premier post qui n'a pas cette ligne de code.
SELECT * FROM blogs, utilisateurs WHERE blogs.utilisateurID = utilisateurs.ID AND blogs.utilisateurID = '2' ORDER BY utilisateurs.pseudo DESC
marche sous phpmyadmin ?

Modérateur PHPfrance
Modérateur PHPfrance | 7636 Messages

31 oct. 2008, 10:49

C'est toujours embêtant d'avoir un code qui n'a rien à voir avec le problème.
Les membres du forum ne disposent QUE de bouts de scripts pour t'aider mais si en plus ils ne sont pas pertinents alors ça ne sert absolument à rien et tout le monde perds son temps !

/!\ Avant de poster se documenter et rechercher.
Qui ne sait pas rendre un service n'a pas le droit d'en demander.
MaBrute

Eléphant du PHP | 51 Messages

31 oct. 2008, 11:27

Merci beaucoup à tous, ça marche maintenant.

Et par ailleurs, désolé de ne pas avoir été plus précis! Merci encore!

Damien
La bave du crapaud n'atteinds pas la blanche colombe.
Site principal: CiaoNetwork
http://blog.ciaonetwork.com