MySQL Forums
Forum List  »  General

Re: Need help with query (dynamic)
Posted by: Birkir Rafn Guðjónsson
Date: June 11, 2010 06:28AM

Wow, thanks a lot for quick reply and great solution.

This is a lot better query than the sub-query one I did, it is at least faster.

But here is another question:

Can it be improved so I don´t need to define the keys in the query, like it some hows check for all keys available.


Something like I would do :
foreach(keys as _key)
{
      MAX(IF(`key` = '_key', val, NULL)) AS _key,
}

without doing it programmaticly

Options: ReplyQuote


Subject
Written By
Posted
Re: Need help with query (dynamic)
June 11, 2010 06:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.