Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
645 connectés 

  FORUM HardWare.fr
  Programmation
  PHP

  [PHP] comment on affiche un champ

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[PHP] comment on affiche un champ

n°165048
seb90
Posté le 24-06-2002 à 22:30:06  profilanswer
 

oui je c c tt con mais y a longtemps que g pa fé d php ...
 
apres un " select * from menu "  
 
je veux afficher le champ "nom" et le champ "lien" mais pas l un apres l autre c est pourquoi je fais pas un select nom,lien from menu
 
merci


---------------
Vendez, achetez et échangez vos jeux vidéos sur http://www.jeutroc.com
mood
Publicité
Posté le 24-06-2002 à 22:30:06  profilanswer
 

n°165056
Je@nb
Kindly give dime
Posté le 24-06-2002 à 22:39:20  profilanswer
 

$sql="select nom,lien from menu";
$req=mysql_query($sql);
$data=mysql_fetc_array($req);
echo $data['nom'];
echo $data['lien'];

n°165063
seb90
Posté le 24-06-2002 à 22:45:20  profilanswer
 

merci !


---------------
Vendez, achetez et échangez vos jeux vidéos sur http://www.jeutroc.com
n°165070
seb90
Posté le 24-06-2002 à 22:51:02  profilanswer
 

ah merde ça marche pas ché free ils ont pa la meme version :
 
Call to unsupported or undefined function mysql_fetc_array()


---------------
Vendez, achetez et échangez vos jeux vidéos sur http://www.jeutroc.com
n°165071
seb90
Posté le 24-06-2002 à 22:51:49  profilanswer
 

ah ben nan il doit juste manquer le h


---------------
Vendez, achetez et échangez vos jeux vidéos sur http://www.jeutroc.com
n°165074
Je@nb
Kindly give dime
Posté le 24-06-2002 à 22:56:41  profilanswer
 

oué dsl  :D  :D  :D

n°165079
seb90
Posté le 24-06-2002 à 23:14:39  profilanswer
 

et je met koi ds le while pour pouvoir lire toute la table ?


---------------
Vendez, achetez et échangez vos jeux vidéos sur http://www.jeutroc.com
n°165084
Je@nb
Kindly give dime
Posté le 24-06-2002 à 23:24:41  profilanswer
 


$sql="select nom,lien from menu";
$req=mysql_query($sql);
while ($data=mysql_fetch_array($req)) {
echo $data['nom'];
echo $data['lien'];
}


Message édité par Je@nb le 24-06-2002 à 23:24:56
n°165085
seb90
Posté le 24-06-2002 à 23:27:40  profilanswer
 

trop cool  j te remercie a fond !!!!
 :love:


---------------
Vendez, achetez et échangez vos jeux vidéos sur http://www.jeutroc.com
n°165087
Je@nb
Kindly give dime
Posté le 24-06-2002 à 23:29:00  profilanswer
 

de rien


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  PHP

  [PHP] comment on affiche un champ

 

Sujets relatifs
[PHP] > Comment faire pour avoir un id unik ?[PHP/Mysql] nb de connecté sur un site: savoir le record
[PHP] - Redirection sans fuckin' header() ...PHP, utiliser une dll
[PHP] Alternative à br2nl() ??[PHP] Problème de Parsing :(((
[SQL] incrémenter un champ en un coup ...PHP MSSQL charset
[PHP/MYSQL][PHP] Champ qui n'affiche pas tout ( voir NEW BUG )
Plus de sujets relatifs à : [PHP] comment on affiche un champ


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR