Modifier un statut
Fermé
Alucard380
Messages postés
19
Date d'inscription
jeudi 18 février 2010
Statut
Membre
Dernière intervention
21 mars 2010
-
18 févr. 2010 à 18:46
arthezius Messages postés 3538 Date d'inscription jeudi 15 mai 2008 Statut Membre Dernière intervention 11 septembre 2016 - 25 févr. 2010 à 21:10
arthezius Messages postés 3538 Date d'inscription jeudi 15 mai 2008 Statut Membre Dernière intervention 11 septembre 2016 - 25 févr. 2010 à 21:10
A voir également:
- Modifier un statut
- Comment modifier un pdf - Guide
- Modifier liste déroulante excel - Guide
- Modifier dns - Guide
- Statut hors ligne instagram - Guide
- Modifier sa voix en direct - Guide
27 réponses
Alucard380
Messages postés
19
Date d'inscription
jeudi 18 février 2010
Statut
Membre
Dernière intervention
21 mars 2010
24 févr. 2010 à 10:38
24 févr. 2010 à 10:38
Merci encore à avionf 16 et à toi arthezius mais ce n'est pas encore ça :/
Voici mon code modifier à ta façon arthezius:
<?php
mysql_connect("localhost", "root", ""); // Connexion à MySQL
mysql_select_db("metin2"); // Sélection de la base metin2
$sql='SELECT * FROM account ORDER BY login ASC'; // Requête SQL
$req = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
// On fait une boucle pour lister tout ce que contient la table :
while($data = mysql_fetch_array($req))
{
$sql='SELECT * FROM account WHERE login="'.$data['login'].'"';
$req_mbr = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
$data_mbr = mysql_fetch_array($req_mbr);
echo $donnees['login'];
echo $donnees['name'];
echo $donnees['status'];
echo $donnees['social_id'];
echo $donnees['playtime'];
echo $donnees['level'];
echo $donnees['exp'];
echo $donnees['gold'];
echo $donnees['ip'];
echo $donnees['last_play'];
echo $donnees['horse_level'];
}
?>
Le premier problème c'est que la colonne login est dans la table account et non la table player, ce qui crash donc le résultat si je ne la modifie pas.
Donc voila, j'ai bien modifier la colonne, mais ces erreurs persistent:
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 17
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 18
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 19
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 20
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 21
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 22
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 23
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 24
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 25
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 26
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 27
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 17
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 18
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 19
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 20
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 21
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 22
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 23
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 24
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 25
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 26
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 27
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 17
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 18
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 19
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 20
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 21
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 22
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 23
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 24
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 25
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 26
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 27
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 17
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 18
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 19
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 20
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 21
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 22
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 23
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 24
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 25
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 26
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 27
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 17
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 18
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 19
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 20
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 21
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 22
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 23
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 24
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 25
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 26
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 27
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 17
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 18
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 19
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 20
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 21
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 22
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 23
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 24
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 25
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 26
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 27
(Et encore c'est une petite partie, je sais pas pourquoi il me les remets tout le temps en boucle...)
Cordialement,
Alucard.
Voici mon code modifier à ta façon arthezius:
<?php
mysql_connect("localhost", "root", ""); // Connexion à MySQL
mysql_select_db("metin2"); // Sélection de la base metin2
$sql='SELECT * FROM account ORDER BY login ASC'; // Requête SQL
$req = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
// On fait une boucle pour lister tout ce que contient la table :
while($data = mysql_fetch_array($req))
{
$sql='SELECT * FROM account WHERE login="'.$data['login'].'"';
$req_mbr = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
$data_mbr = mysql_fetch_array($req_mbr);
echo $donnees['login'];
echo $donnees['name'];
echo $donnees['status'];
echo $donnees['social_id'];
echo $donnees['playtime'];
echo $donnees['level'];
echo $donnees['exp'];
echo $donnees['gold'];
echo $donnees['ip'];
echo $donnees['last_play'];
echo $donnees['horse_level'];
}
?>
Le premier problème c'est que la colonne login est dans la table account et non la table player, ce qui crash donc le résultat si je ne la modifie pas.
Donc voila, j'ai bien modifier la colonne, mais ces erreurs persistent:
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 17
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 18
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 19
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 20
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 21
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 22
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 23
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 24
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 25
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 26
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 27
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 17
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 18
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 19
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 20
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 21
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 22
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 23
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 24
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 25
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 26
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 27
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 17
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 18
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 19
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 20
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 21
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 22
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 23
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 24
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 25
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 26
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 27
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 17
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 18
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 19
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 20
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 21
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 22
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 23
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 24
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 25
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 26
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 27
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 17
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 18
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 19
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 20
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 21
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 22
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 23
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 24
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 25
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 26
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 27
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 17
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 18
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 19
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 20
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 21
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 22
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 23
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 24
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 25
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 26
Notice: Undefined variable: donnees in C:\wamp\www\searchip.php on line 27
(Et encore c'est une petite partie, je sais pas pourquoi il me les remets tout le temps en boucle...)
Cordialement,
Alucard.
avion-f16
Messages postés
19244
Date d'inscription
dimanche 17 février 2008
Statut
Contributeur
Dernière intervention
17 avril 2024
4 496
24 févr. 2010 à 14:19
24 févr. 2010 à 14:19
Remplace tous tes $donnees par $data_mbr dans la boucle while
Alucard380
Messages postés
19
Date d'inscription
jeudi 18 février 2010
Statut
Membre
Dernière intervention
21 mars 2010
24 févr. 2010 à 20:13
24 févr. 2010 à 20:13
Maintenant que j'ai fais comme tu a dit avion,
Voila l'erreur:
Notice: Undefined index: name in C:\wamp\www\searchip.php on line 18
BAN
Notice: Undefined index: playtime in C:\wamp\www\searchip.php on line 21
Notice: Undefined index: level in C:\wamp\www\searchip.php on line 22
Notice: Undefined index: exp in C:\wamp\www\searchip.php on line 23
Notice: Undefined index: gold in C:\wamp\www\searchip.php on line 24
Notice: Undefined index: ip in C:\wamp\www\searchip.php on line 25
Notice: Undefined index: last_play in C:\wamp\www\searchip.php on line 26
Notice: Undefined index: horse_level in C:\wamp\www\searchip.php on line 27
Alucard380zgm
Notice: Undefined index: name in C:\wamp\www\searchip.php on line 18
OK1234567
Notice: Undefined index: playtime in C:\wamp\www\searchip.php on line 21
Notice: Undefined index: level in C:\wamp\www\searchip.php on line 22
Notice: Undefined index: exp in C:\wamp\www\searchip.php on line 23
Notice: Undefined index: gold in C:\wamp\www\searchip.php on line 24
Notice: Undefined index: ip in C:\wamp\www\searchip.php on line 25
Notice: Undefined index: last_play in C:\wamp\www\searchip.php on line 26
Notice: Undefined index: horse_level in C:\wamp\www\searchip.php on line 27
andrieu33
Notice: Undefined index: name in C:\wamp\www\searchip.php on line 18
OK1234567
Notice: Undefined index: playtime in C:\wamp\www\searchip.php on line 21
Notice: Undefined index: level in C:\wamp\www\searchip.php on line 22
Notice: Undefined index: exp in C:\wamp\www\searchip.php on line 23
Notice: Undefined index: gold in C:\wamp\www\searchip.php on line 24
Notice: Undefined index: ip in C:\wamp\www\searchip.php on line 25
Notice: Undefined index: last_play in C:\wamp\www\searchip.php on line 26
Notice: Undefined index: horse_level in C:\wamp\www\searchip.php on line 27
Anomalie9119
Notice: Undefined index: name in C:\wamp\www\searchip.php on line 18
OK1234567
Notice: Undefined index: playtime in C:\wamp\www\searchip.php on line 21
Voila l'erreur:
Notice: Undefined index: name in C:\wamp\www\searchip.php on line 18
BAN
Notice: Undefined index: playtime in C:\wamp\www\searchip.php on line 21
Notice: Undefined index: level in C:\wamp\www\searchip.php on line 22
Notice: Undefined index: exp in C:\wamp\www\searchip.php on line 23
Notice: Undefined index: gold in C:\wamp\www\searchip.php on line 24
Notice: Undefined index: ip in C:\wamp\www\searchip.php on line 25
Notice: Undefined index: last_play in C:\wamp\www\searchip.php on line 26
Notice: Undefined index: horse_level in C:\wamp\www\searchip.php on line 27
Alucard380zgm
Notice: Undefined index: name in C:\wamp\www\searchip.php on line 18
OK1234567
Notice: Undefined index: playtime in C:\wamp\www\searchip.php on line 21
Notice: Undefined index: level in C:\wamp\www\searchip.php on line 22
Notice: Undefined index: exp in C:\wamp\www\searchip.php on line 23
Notice: Undefined index: gold in C:\wamp\www\searchip.php on line 24
Notice: Undefined index: ip in C:\wamp\www\searchip.php on line 25
Notice: Undefined index: last_play in C:\wamp\www\searchip.php on line 26
Notice: Undefined index: horse_level in C:\wamp\www\searchip.php on line 27
andrieu33
Notice: Undefined index: name in C:\wamp\www\searchip.php on line 18
OK1234567
Notice: Undefined index: playtime in C:\wamp\www\searchip.php on line 21
Notice: Undefined index: level in C:\wamp\www\searchip.php on line 22
Notice: Undefined index: exp in C:\wamp\www\searchip.php on line 23
Notice: Undefined index: gold in C:\wamp\www\searchip.php on line 24
Notice: Undefined index: ip in C:\wamp\www\searchip.php on line 25
Notice: Undefined index: last_play in C:\wamp\www\searchip.php on line 26
Notice: Undefined index: horse_level in C:\wamp\www\searchip.php on line 27
Anomalie9119
Notice: Undefined index: name in C:\wamp\www\searchip.php on line 18
OK1234567
Notice: Undefined index: playtime in C:\wamp\www\searchip.php on line 21
avion-f16
Messages postés
19244
Date d'inscription
dimanche 17 février 2008
Statut
Contributeur
Dernière intervention
17 avril 2024
4 496
24 févr. 2010 à 20:43
24 févr. 2010 à 20:43
Ton truc c'est un peu n'importe quoi : deux requêtes dans la même table pour récupérer toutes les infos au final ...
<?php mysql_connect(); mysql_select_db(); $sql = 'SELECT * FROM `account` ORDER BY `login` ASC'; $req = mysql_query($sql); while($membre = mysql_fetch_assoc($req)) { echo $membre['login'].'<br/>'."\n"; echo $membre['name'].'<br/>'."\n"; echo $membre['status'].'<br/>'."\n"; echo $membre['social_id'].'<br/>'."\n"; echo $membre['playtime'].'<br/>'."\n"; echo $membre['level'].'<br/>'."\n"; echo $membre['exp'].'<br/>'."\n"; echo $membre['gold'].'<br/>'."\n"; echo $membre['ip'].'<br/>'."\n"; echo $membre['last_play'].'<br/>'."\n"; echo $membre['horse_level'].'<br/>'."\n"; } mysql_close(); ?>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Alucard380
Messages postés
19
Date d'inscription
jeudi 18 février 2010
Statut
Membre
Dernière intervention
21 mars 2010
24 févr. 2010 à 21:37
24 févr. 2010 à 21:37
Toujours la même erreur même avec le code que tu m'a donner :/ :
<?php
mysql_connect("localhost", "root", ""); // Connexion à MySQL
mysql_select_db("metin2"); // Sélection de la base coursphp
$sql = 'SELECT * FROM `account` ORDER BY `login` ASC';
$req = mysql_query($sql);
while($membre = mysql_fetch_assoc($req)) {
echo $membre['login'].'<br/>'."\n";
echo $membre['name'].'<br/>'."\n";
echo $membre['status'].'<br/>'."\n";
echo $membre['social_id'].'<br/>'."\n";
echo $membre['playtime'].'<br/>'."\n";
echo $membre['level'].'<br/>'."\n";
echo $membre['exp'].'<br/>'."\n";
echo $membre['gold'].'<br/>'."\n";
echo $membre['ip'].'<br/>'."\n";
echo $membre['last_play'].'<br/>'."\n";
echo $membre['horse_level'].'<br/>'."\n";
}
?>
L'erreur:
Notice: Undefined index: name in C:\wamp\www\searchip.php on line 10
BAN
Notice: Undefined index: playtime in C:\wamp\www\searchip.php on line 13
Notice: Undefined index: level in C:\wamp\www\searchip.php on line 14
Notice: Undefined index: exp in C:\wamp\www\searchip.php on line 15
Notice: Undefined index: gold in C:\wamp\www\searchip.php on line 16
Notice: Undefined index: ip in C:\wamp\www\searchip.php on line 17
Notice: Undefined index: last_play in C:\wamp\www\searchip.php on line 18
Notice: Undefined index: horse_level in C:\wamp\www\searchip.php on line 19
Alucard380zgm
Notice: Undefined index: name in C:\wamp\www\searchip.php on line 10
OK
1234567
Notice: Undefined index: playtime in C:\wamp\www\searchip.php on line 13
Notice: Undefined index: level in C:\wamp\www\searchip.php on line 14
Notice: Undefined index: exp in C:\wamp\www\searchip.php on line 15
Notice: Undefined index: gold in C:\wamp\www\searchip.php on line 16
Notice: Undefined index: ip in C:\wamp\www\searchip.php on line 17
Notice: Undefined index: last_play in C:\wamp\www\searchip.php on line 18
Notice: Undefined index: horse_level in C:\wamp\www\searchip.php on line 19
andrieu33
Notice: Undefined index: name in C:\wamp\www\searchip.php on line 10
OK
1234567
Notice: Undefined index: playtime in C:\wamp\www\searchip.php on line 13
Notice: Undefined index: level in C:\wamp\www\searchip.php on line 14
Notice: Undefined index: exp in C:\wamp\www\searchip.php on line 15
Notice: Undefined index: gold in C:\wamp\www\searchip.php on line 16
Notice: Undefined index: ip in C:\wamp\www\searchip.php on line 17
Notice: Undefined index: last_play in C:\wamp\www\searchip.php on line 18
Notice: Undefined index: horse_level in C:\wamp\www\searchip.php on line 19
Anomalie9119
Notice: Undefined index: name in C:\wamp\www\searchip.php on line 10
OK
1234567
Notice: Undefined index: playtime in C:\wamp\www\searchip.php on line 13
Notice: Undefined index: level in C:\wamp\www\searchip.php on line 14
Notice: Undefined index: exp in C:\wamp\www\searchip.php on line 15
Notice: Undefined index: gold in C:\wamp\www\searchip.php on line 16
Notice: Undefined index: ip in C:\wamp\www\searchip.php on line 17
<?php
mysql_connect("localhost", "root", ""); // Connexion à MySQL
mysql_select_db("metin2"); // Sélection de la base coursphp
$sql = 'SELECT * FROM `account` ORDER BY `login` ASC';
$req = mysql_query($sql);
while($membre = mysql_fetch_assoc($req)) {
echo $membre['login'].'<br/>'."\n";
echo $membre['name'].'<br/>'."\n";
echo $membre['status'].'<br/>'."\n";
echo $membre['social_id'].'<br/>'."\n";
echo $membre['playtime'].'<br/>'."\n";
echo $membre['level'].'<br/>'."\n";
echo $membre['exp'].'<br/>'."\n";
echo $membre['gold'].'<br/>'."\n";
echo $membre['ip'].'<br/>'."\n";
echo $membre['last_play'].'<br/>'."\n";
echo $membre['horse_level'].'<br/>'."\n";
}
?>
L'erreur:
Notice: Undefined index: name in C:\wamp\www\searchip.php on line 10
BAN
Notice: Undefined index: playtime in C:\wamp\www\searchip.php on line 13
Notice: Undefined index: level in C:\wamp\www\searchip.php on line 14
Notice: Undefined index: exp in C:\wamp\www\searchip.php on line 15
Notice: Undefined index: gold in C:\wamp\www\searchip.php on line 16
Notice: Undefined index: ip in C:\wamp\www\searchip.php on line 17
Notice: Undefined index: last_play in C:\wamp\www\searchip.php on line 18
Notice: Undefined index: horse_level in C:\wamp\www\searchip.php on line 19
Alucard380zgm
Notice: Undefined index: name in C:\wamp\www\searchip.php on line 10
OK
1234567
Notice: Undefined index: playtime in C:\wamp\www\searchip.php on line 13
Notice: Undefined index: level in C:\wamp\www\searchip.php on line 14
Notice: Undefined index: exp in C:\wamp\www\searchip.php on line 15
Notice: Undefined index: gold in C:\wamp\www\searchip.php on line 16
Notice: Undefined index: ip in C:\wamp\www\searchip.php on line 17
Notice: Undefined index: last_play in C:\wamp\www\searchip.php on line 18
Notice: Undefined index: horse_level in C:\wamp\www\searchip.php on line 19
andrieu33
Notice: Undefined index: name in C:\wamp\www\searchip.php on line 10
OK
1234567
Notice: Undefined index: playtime in C:\wamp\www\searchip.php on line 13
Notice: Undefined index: level in C:\wamp\www\searchip.php on line 14
Notice: Undefined index: exp in C:\wamp\www\searchip.php on line 15
Notice: Undefined index: gold in C:\wamp\www\searchip.php on line 16
Notice: Undefined index: ip in C:\wamp\www\searchip.php on line 17
Notice: Undefined index: last_play in C:\wamp\www\searchip.php on line 18
Notice: Undefined index: horse_level in C:\wamp\www\searchip.php on line 19
Anomalie9119
Notice: Undefined index: name in C:\wamp\www\searchip.php on line 10
OK
1234567
Notice: Undefined index: playtime in C:\wamp\www\searchip.php on line 13
Notice: Undefined index: level in C:\wamp\www\searchip.php on line 14
Notice: Undefined index: exp in C:\wamp\www\searchip.php on line 15
Notice: Undefined index: gold in C:\wamp\www\searchip.php on line 16
Notice: Undefined index: ip in C:\wamp\www\searchip.php on line 17
arthezius
Messages postés
3538
Date d'inscription
jeudi 15 mai 2008
Statut
Membre
Dernière intervention
11 septembre 2016
475
24 févr. 2010 à 23:31
24 févr. 2010 à 23:31
Ce que j'ai donnée était avant un exemple.
Faut l'adapter à ta situation.
J'ai supposé (sans être devin) que ta table player comportait ta liste de membre.
Ma première requête liste donc les membres.
Ensuite, j'ai supposé que ta table account comporte les données de chaque compte.
J'ai donc fait ma deuxième requête pour chaque membre (via la boucle) pour récupérer leurs données que j'ai supposé être dans cette seconde table.
Mais en fait, je ne sais pas du tout à quoi te serve ces deux tables.
Tu ne nous explique rien.
Explique nous a quoi servent la table account et player si tu veux qu'on t'aider sérieusement (éventuellement en nous détaillant les colonnes de celles-ci.
Sans ça, on ne peu que faire des suppositions.
Faut l'adapter à ta situation.
J'ai supposé (sans être devin) que ta table player comportait ta liste de membre.
Ma première requête liste donc les membres.
Ensuite, j'ai supposé que ta table account comporte les données de chaque compte.
J'ai donc fait ma deuxième requête pour chaque membre (via la boucle) pour récupérer leurs données que j'ai supposé être dans cette seconde table.
Mais en fait, je ne sais pas du tout à quoi te serve ces deux tables.
Tu ne nous explique rien.
Explique nous a quoi servent la table account et player si tu veux qu'on t'aider sérieusement (éventuellement en nous détaillant les colonnes de celles-ci.
Sans ça, on ne peu que faire des suppositions.
Alucard380
Messages postés
19
Date d'inscription
jeudi 18 février 2010
Statut
Membre
Dernière intervention
21 mars 2010
25 févr. 2010 à 00:12
25 févr. 2010 à 00:12
Re. Ah d'accord :$ je croyais que c'était directement la solution moi * se tape la tête *
Alors pour les tables account et player ce sont deux tables différentes qui en faites ont toutes les deux des informations importantes dont j'ai absolument besoin:
La colonne login appartient à la table account; elle indique le nom de compte
La colonne name appartient à la table player; elle indique le nom du personnage
La colonne status appartient à la table account; elle indique si le compte es banni ou pas
La colonne social_id appartient à la table player; elle indique le code de suppresion du personnage
La colonne playtime appartient à la table player; elle indique le temps de jeu sur le personnage
La colonne level appartient à la table player; elle indique le niveau du personnage
La colonne exp appartient à la table player; elle indique le pourcentage avant le level up d'un personnage
La colonne gold appartient à la table player; elle indique le nombre de yang (argent) que possède le personnage
La colonne ip appartient à la table player; elle indique l'ip avec laquel le compte s'est enregistrer
La colonne last_play appartient à la table player; elle indique la dernière connexion du joueur
La colonne horse_level appartient à la table player; elle indique le level du cheval du joueur
Voila toutes les informations dont j'ai besoin.
Cordialement,
Alucard.
Alors pour les tables account et player ce sont deux tables différentes qui en faites ont toutes les deux des informations importantes dont j'ai absolument besoin:
La colonne login appartient à la table account; elle indique le nom de compte
La colonne name appartient à la table player; elle indique le nom du personnage
La colonne status appartient à la table account; elle indique si le compte es banni ou pas
La colonne social_id appartient à la table player; elle indique le code de suppresion du personnage
La colonne playtime appartient à la table player; elle indique le temps de jeu sur le personnage
La colonne level appartient à la table player; elle indique le niveau du personnage
La colonne exp appartient à la table player; elle indique le pourcentage avant le level up d'un personnage
La colonne gold appartient à la table player; elle indique le nombre de yang (argent) que possède le personnage
La colonne ip appartient à la table player; elle indique l'ip avec laquel le compte s'est enregistrer
La colonne last_play appartient à la table player; elle indique la dernière connexion du joueur
La colonne horse_level appartient à la table player; elle indique le level du cheval du joueur
Voila toutes les informations dont j'ai besoin.
Cordialement,
Alucard.
arthezius
Messages postés
3538
Date d'inscription
jeudi 15 mai 2008
Statut
Membre
Dernière intervention
11 septembre 2016
475
25 févr. 2010 à 12:31
25 févr. 2010 à 12:31
Qu'est-ce qui te permet dans la table player d'identifier à qui appartiennent ces informations?
Alucard380
Messages postés
19
Date d'inscription
jeudi 18 février 2010
Statut
Membre
Dernière intervention
21 mars 2010
25 févr. 2010 à 13:07
25 févr. 2010 à 13:07
Hum... pas bête :S. A la limite le nom du personnage, mais jusqu'à présent je faisais de la recherche par le nom du compte.
arthezius
Messages postés
3538
Date d'inscription
jeudi 15 mai 2008
Statut
Membre
Dernière intervention
11 septembre 2016
475
25 févr. 2010 à 21:10
25 févr. 2010 à 21:10
Pour être plus précis dans ma question, si tu veux utiliser les données de la table player, il faut que tu puisses déterminer à qui elles appartiennent.
Tu peux par exemple y ajouter une colonne login ou quelques chose de ce genre dans cette table.
Si tu veux exploiter les données de la table player tu devra faire une requête du genre:
Dans cet exmple, on suppose que le login est enregistré dans la table (pour permettre les recherche et d'utiliser les données) et que l'utilisateur est loggé via un cookie contenant son login.
C'est une manière assez simple de procéder.
L'idée c'est de se dire: comment savoir à qui corresponds tel ou tel ligne de la table player ?
Ou autrement dit: comment savoir quelles données appartiennent à ce membre ?
Donc comment fait tu pour savoir quelles données appartiennent à qui ?
Hésites pas à me détailler séparément la structure des deux tables si tu ne m'as pas tout donné dans un des précédents messages que tu as mis, car là j'arrive pas à déterminer comment tu peux savoir à qui appartiennent tel ou tel données de ta table player.
Sans ça, pas facile de t'aider.
Tu peux par exemple y ajouter une colonne login ou quelques chose de ce genre dans cette table.
Si tu veux exploiter les données de la table player tu devra faire une requête du genre:
[...] $sql='SELECT * FROM player WHERE login="'.$_COOKIE['pl_login'].'"'; [...]
Dans cet exmple, on suppose que le login est enregistré dans la table (pour permettre les recherche et d'utiliser les données) et que l'utilisateur est loggé via un cookie contenant son login.
C'est une manière assez simple de procéder.
L'idée c'est de se dire: comment savoir à qui corresponds tel ou tel ligne de la table player ?
Ou autrement dit: comment savoir quelles données appartiennent à ce membre ?
Donc comment fait tu pour savoir quelles données appartiennent à qui ?
Hésites pas à me détailler séparément la structure des deux tables si tu ne m'as pas tout donné dans un des précédents messages que tu as mis, car là j'arrive pas à déterminer comment tu peux savoir à qui appartiennent tel ou tel données de ta table player.
Sans ça, pas facile de t'aider.