Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



MySQL query in a query

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 21-07-2009
Member
 
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.

Reply With Quote
  #2  
Old 21-07-2009
Member
 
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.
Reply With Quote
  #3  
Old 21-07-2009
Member
 
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?
Reply With Quote
  #4  
Old 21-07-2009
Member
 
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
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "MySQL query in a query"
Thread Thread Starter Forum Replies Last Post
Turn on MySQL query cache to speed up query performance DMA2Superman Software Development 3 07-07-2009 10:26 AM
Use variables in a MySQL query Chrisch Software Development 3 25-04-2009 12:11 PM
MySQL Query Cache Ryder Software Development 3 16-04-2009 03:05 PM
MySQL IF ELSE in Query Ryder Software Development 3 27-03-2009 05:24 PM
MySQL UPDATE Query ANDERS Software Development 2 10-02-2009 10:57 AM


All times are GMT +5.5. The time now is 10:34 AM.