Results 1 to 2 of 2

Thread: Need to have multiple where queries in MySQL query

  1. #1
    Join Date
    Apr 2008
    Posts
    32

    Need to have multiple where queries in MySQL query

    Hello,

    I have some queries for mysql but I don't know how to form them because they are really complex & I hope if we can have multiple where clause in a single query.
    easy way to check if a condiction has multiple possible values
    If you can help me with constructing multiple where clause in single statement It will solve my problem.
    If its possible please head me towards a good tutorial please.

  2. #2
    Join Date
    Oct 2008
    Posts
    116

    Re: Need to have multiple where queries in MySQL query

    Hello friend,

    Even I need to know how can I have multiple cases in a single statement using where clause like as follows.
    This is what i need to do.
    Code:
    SELECT column_1, AVG(column_2), (AVG(column_2) WHERE column_3 = 'puppies')
    FROM tablename GROUP BY column_1
    I hope someone will come up with the solution.

Similar Threads

  1. Optimizing queries in MySQL
    By Caden Fernandes in forum Software Development
    Replies: 4
    Last Post: 05-03-2010, 07:14 PM
  2. How to Run MySQL Queries with PHP?
    By Rob Dizzle in forum Software Development
    Replies: 4
    Last Post: 05-02-2010, 05:40 AM
  3. Show Number of MySQL Queries
    By Jagriti in forum Software Development
    Replies: 3
    Last Post: 28-07-2009, 03:17 PM
  4. 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
  5. How can I convert 2 queries into single query
    By Nutty in forum Software Development
    Replies: 4
    Last Post: 04-05-2009, 10:47 AM

Tags for this Thread

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
  •  
Page generated in 1,711,648,858.42387 seconds with 16 queries