mysql - Multiple SQL searches vs searching through one returned array -


Is it possible to find multiple SQL in a table with different conditions or to get all the items in a table and then Is that different from them? I know that I am not explaining my question that it is okay, then this is an example:

I want to draw a record on the posts and show them in categories based on the posting Within a year, I say one month, one week, etc. The nature of the categories is in the lower level categories, which are completely contained in upper level people.

Should I get SQL for each category in different situations, as a result, many calls to the database are available, or should I do a search, return all the items and then put them out of the array? Thanks for your responses, sorry I'm new to this.

Usually, I say that you are going to get better performance by giving your database engine a sorting job To do this, each database engine has this functionality and generally it can do as quickly as you can.

So instead of trying to do myself in the memory, I will vote to use the database to get many of my groups.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -