Professional Web Applications Themes

MySQL Multiple tables / results - PHP Development

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...

  1. #1

    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


    RG Guest

  2. #2

    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
    _`\<,_ yst / Programmer
    (_)/ (_) [url]www.alexfarran.com[/url]

    Alex Farran Guest

  3. #3

    Default Re: MySQL Multiple tables / results

    On Sat, 13 Sep 2003 11:34:16 +0100, "RG" <MeNotTellingYa.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 (andyandyh.co.uk) icq(5747695) ([url]http://www.andyh.co.uk[/url])
    Space: disk usage ysis tool ([url]http://www.andyhsoftware.co.uk/space[/url])
    Andy Hassall Guest

  4. #4

    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?)

    [url]http://www.mysql.com/doc/en/JOIN.html[/url]

    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
    [url]http://www.quanetic.com[/url]


    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
    >
    >
    Kurt Milligan Guest

Similar Threads

  1. CFINSERT into multiple tables? MySQL
    By jawwinker in forum Coldfusion Database Access
    Replies: 1
    Last Post: January 24th, 04:30 AM
  2. update multiple records in multiple tables from one form
    By Anj01 in forum Coldfusion Database Access
    Replies: 1
    Last Post: May 17th, 05:54 AM
  3. How to Query on multiple tables
    By jt in forum ASP Database
    Replies: 3
    Last Post: May 10th, 10:08 PM
  4. find values in two tables, display results in one
    By Joseph O'Brien in forum FileMaker
    Replies: 1
    Last Post: September 18th, 09:58 PM
  5. Multiple MySQL tables
    By Carlos Marangon in forum PHP Development
    Replies: 3
    Last Post: August 18th, 12:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139