PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.general > adding the results of mysql_query
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
adding the results of mysql_query

Réponse
 
LinkBack Outils de la discussion
Vieux 06/05/2008, 16h05   #1
It Maq
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut adding the results of mysql_query

Hi,

I need to add the result of 4 calls to mysql_query (4 different queries) to the same object so that i can mysql_fetch_object in the same loop.

Is that possible? otherwise is there any other alternative?

Thank you


__________________________________________________ __________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i...Dypao8Wcj9tAcJ

  Réponse avec citation
Vieux 06/05/2008, 16h13   #2
M. Sokolewicz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: adding the results of mysql_query

It Maq wrote:
> Hi,
>
> I need to add the result of 4 calls to mysql_query (4 different queries) to the same object so that i can mysql_fetch_object in the same loop.
>
> Is that possible? otherwise is there any other alternative?
>
> Thank you
>
>
> __________________________________________________ __________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i...Dypao8Wcj9tAcJ
>


use a UNION (look it up in the mysql manual)
  Réponse avec citation
Vieux 06/05/2008, 17h46   #3
Stut
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] adding the results of mysql_query

On 6 May 2008, at 15:05, It Maq wrote:
> I need to add the result of 4 calls to mysql_query (4 different
> queries) to the same object so that i can mysql_fetch_object in the
> same loop.
>
> Is that possible? otherwise is there any other alternative?


No, but you should be able to do it in one query...

http://dev.mysql.com/doc/refman/5.0/en/union.html

-Stut

--
http://stut.net/
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 19h58.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09338 seconds with 11 queries