MySQL Multiple tables / results

This is a discussion on MySQL Multiple tables / results within the PHP Language forums, part of the PHP Programming Forums category; Hopefully someone here can help. I would like to perform multiple queries to a MySQL database and have all the ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-13-2003
RG
 
Posts: n/a
Default MySQL Multiple tables / results

Hopefully someone here can help.
I would like to perform multiple queries to a MySQL database and have all
the results in 1 result set.
Is this possible?

TIA
RG


Reply With Quote
  #2 (permalink)  
Old 09-13-2003
Alex Farran
 
Posts: n/a
Default Re: MySQL Multiple tables / results

RG writes:

> Hopefully someone here can help.
> I would like to perform multiple queries to a MySQL database and have all
> the results in 1 result set.
> Is this possible?


How do you mean? You could do this for example:

select * from table where (<query 1>) or (<query 2>);

Which would return the union of the results of the two queries.


--

__o Alex Farran
_`\<,_ Analyst / Programmer
(_)/ (_) www.alexfarran.com

Reply With Quote
  #3 (permalink)  
Old 09-13-2003
Andy Hassall
 
Posts: n/a
Default Re: MySQL Multiple tables / results

On Sat, 13 Sep 2003 11:34:16 +0100, "RG" <Me@NotTellingYa.com> wrote:

>Hopefully someone here can help.
>I would like to perform multiple queries to a MySQL database and have all
>the results in 1 result set.
>Is this possible?


Not unless you give more details. In general, no; how do you delimit the
multiple result sets? What if each query returns a different number and type of
columns? It becomes nonsensical very quickly.

--
Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Reply With Quote
  #4 (permalink)  
Old 09-13-2003
Kurt Milligan
 
Posts: n/a
Default Re: MySQL Multiple tables / results

Do the tables have common connections, so that you can do a JOIN?
(are they related in some way?)

http://www.mysql.com/doc/en/JOIN.html

You need to be more specifc and tell us your table structures
and what you want out of the query if you'd like more help.

-Kurt
http://www.quanetic.com


RG wrote:
> Hopefully someone here can help.
> I would like to perform multiple queries to a MySQL database and have all
> the results in 1 result set.
> Is this possible?
>
> TIA
> RG
>
>


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:55 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0