recuperer le pseudo d'un posteur
- Accueil
- Forum
- Programmation
- PHP
- recuperer le pseudo d'un posteur

bykertix Le 18 mai 2016 Ă 20:34 (ĂditĂ© le 25 janvier 2019 Ă 17:51)

Aendawan Le 18 mai 2016 Ă 20:59 (ĂditĂ© le 1 janvier 1970 Ă 01:00)
Cordialement, Aendawan.

Florian Le 18 mai 2016 Ă 23:42 (ĂditĂ© le 1 janvier 1970 Ă 01:00)
function info($id, $info) {
  global $bdd;
  $infos = $bdd->prepare('SELECT * FROM membres WHERE id = ?');
  $infos->execute(array($id));
  $infos = $infos->fetch()[$info];
  return $infos;
}
Ici c'est une function, mais je t'explique vite fait, imaginons que tu rĂ©cup l'id via $r['news_id_posteur'] ben tu auras jsute a faire info($r['news_id_posteur'], users) sa te retourne sont pseudo, perso j'ai crĂ©Ă© cette function qui me sert souvent qui me permet de retourner toutes les infos facilement đ 
bykertix Le 20 mai 2016 Ă 20:51 (ĂditĂ© le 1 janvier 1970 Ă 01:00)

guewen Le 21 mai 2016 Ă 19:22 (ĂditĂ© le 1 janvier 1970 Ă 01:00)

guewen Le 23 mai 2016 Ă 19:23 (ĂditĂ© le 1 janvier 1970 Ă 01:00)