Unable to jump to row 0 on MySQL result
voila un de mes souçis car il y'en a plusieurs :cry: quand on va sur la page les membres et que l'on clique sur un des membres la page profil s'affiche jusque la c'est normal mais c'est ensuite quand l'on veux voir la photo du membre rien ne va plus ! voila l'erreur :Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/renccas/public_html/portrait.php on line 39je vous laisse le code de la page profil
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>bienvenue</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<div align="center">
<table border="1" width="90%">
<tr>
<td width="100%" colspan="3" align="center"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="468" height="60">
<param name="movie" value="tmpl056_34901163c215f2.swf">
<param name="quality" value="high">
<embed src="tmpl056_34901163c215f2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="468" height="60" ></embed>
</object> </td>
</tr>
<tr>
<td width="20%" align="center"><a href="inscri.php">inscription</a><br/><a href="connect.php">connection</a><br/><!-- Code HTML service Compteur live de Hawa Tools -->
<script type="text/javascript" src="http://www.hawatools.com/service-cpt-live/compteur.php?id_membre=10262&id=2303&visible=1"></script>
<noscript>
<a href="http://www.hawatools.com" target="_blank" title="Services gratuits pour webmasters">Compteur gratuit</a>
</noscript>
<!-- Code HTML service Compteur live de Hawa Tools --></td>
<td width="60%" align="center"><?php
mysql_connect("xxxxxx", "xxxxxx", "xxxxxxx"); // Connexion à MySQL
mysql_select_db("xxxxxxxxxx"); // Sélection de la base
$sql = "SELECT * FROM inscri WHERE id = '$id'";
$qry = mysql_query($sql);
{
?>
<div align="center"><?php echo "son pseudo : " . mysql_result($qry, 0, 'pseudo') . "<br />";?>
<?php echo "sa région : " . mysql_result($qry, 0, 'région') . "<br />";?>
<?php echo "son département : " . mysql_result($qry, 0, 'dep') . "<br />";?>
<?php echo "sa ville : " . mysql_result($qry, 0, 'ville') . "<br />";?>
<?php echo "son age : " . mysql_result($qry, 0, 'age') . "<br />";?>
<?php echo "sa taille : " . mysql_result($qry, 0, 'taille') . "cm<br />";?>
<a href="portrait.php">sa photo</a></div>
<?php
}
mysql_close(); // Déconnexion de MySQL
?></td>
</tr>
<tr>
</tr>
<tr>
<td width="100%" colspan="3" align="center"></td>
</tr>
</table>
</div>
</body>
</html> |
et celle de la page portrait.php
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>pics</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<div align="center">
<table border="1" width="90%">
<tr>
<td width="100%" colspan="3" align="center"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="468" height="60">
<param name="movie" value="tmpl056_34901163c215f2.swf">
<param name="quality" value="high">
<embed src="tmpl056_34901163c215f2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="468" height="60" ></embed>
</object> </td>
</tr>
<tr>
<td width="20%" align="center"><a href="index.php">acceuil</a><br/><a href="connect.php">connection</a><br/><!-- Code HTML service Compteur live de Hawa Tools -->
<script type="text/javascript" src="http://www.hawatools.com/service-cpt-live/compteur.php?id_membre=10262&id=2303&visible=1"></script>
<noscript>
<a href="http://www.hawatools.com" target="_blank" title="Services gratuits pour webmasters">Compteur gratuit</a>
</noscript>
<!-- Code HTML service Compteur live de Hawa Tools --></td>
<td width="60%" align="center"><?php
mysql_connect("xxxxxxxx", "xxxxxx", "xxxxxx");
mysql_select_db("xxxxxxxxxxxx");
$reponse = mysql_query("SELECT * FROM inscri");
//récupération de l'id passé en paramètre
$id = $_REQUEST['id'] ;
$sql = "SELECT * FROM inscri WHERE id = '" . $id . "'";
$qry = mysql_query($sql) or die(mysql_error() . '<br :>SQL : ' . $sql);
$avatar = mysql_result($qry, 0, 'avatar');
//affichage de la photo.
echo "<img src='" . $avatar ."'/>";
mysql_close(); // Déconnexion de MySQL
?></td>
</tr>
<tr>
</tr>
<tr>
<td width="100%" colspan="3" align="center"></td>
</tr>
</table>
</div>
</body>
</html> |
est ce quelqu'un pourrais m'aider a résoudre ce souçi ? :D