Results 1 to 4 of 4

Thread: MySQL query in a query

  1. #1
    Join Date
    Oct 2008
    Posts
    76

    MySQL query in a query

    Hi,

    I want to know if we can pass multiple query in a single query?
    I am updating a php form on web page with multiple values. I want to know if I can join or make a single query for those update.

    Thanks in advance.

  2. #2
    Join Date
    May 2008
    Posts
    38

    Re: MySQL quary in a query

    What do you mean by MySQL query in a query?
    I don't think its a good idea to marge multiple queries. What you can do is just use joiner or tolls present in Mysql for your help according to the scenario.
    Personally I don't combine multiple MySQL queries. Its better if you keep them separate. SO it wont get messy & you can always troubleshoot or work on your code at later time with less pain.

  3. #3
    Join Date
    Nov 2008
    Posts
    109

    Re: MySQL quary in a query

    Technically speaking its not supported in current MySQL environment to sent multiple queries in a single query. You can create procedures & triggers if you wish?
    According to MySQL & PHP what you want to do is not supported.

    Anyway I have a question about nested query.
    I have this code.

    Code:
    SELECT column_1, column_2, column_1
    FROM table1 a, table2 b
    WHERE a.playerid = b.playerid AND b.matchid
    IN (
    
    SELECT matchid
    FROM matches
    WHERE season =2000
    )
    GROUP BY nickname
    ORDER BY avg( score ) DESC
    Can anyone help?

  4. #4
    Join Date
    May 2008
    Posts
    38

    Re: MySQL quary in a query

    You need to learn the Update statement in SQL.
    I think this tutorial will help you.
    http://www.tizag.com/mysqlTutorial/mysqlupdate.php

Similar Threads

  1. Turn on MySQL query cache to speed up query performance
    By DMA2Superman in forum Software Development
    Replies: 3
    Last Post: 07-07-2009, 10:26 AM
  2. Use variables in a MySQL query
    By Chrisch in forum Software Development
    Replies: 3
    Last Post: 25-04-2009, 12:11 PM
  3. MySQL Query Cache
    By Ryder in forum Software Development
    Replies: 3
    Last Post: 16-04-2009, 03:05 PM
  4. MySQL IF ELSE in Query
    By Ryder in forum Software Development
    Replies: 3
    Last Post: 27-03-2009, 05:24 PM
  5. MySQL UPDATE Query
    By ANDERS in forum Software Development
    Replies: 2
    Last Post: 10-02-2009, 10:57 AM

Posting Permissions

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