Jump to content

SQL Comlicate querys VS PHP Simple manipulation!


mamad876

Recommended Posts

Hello all,

 

I have a problem, that I thought maybe some one have a experience it it.

First lets explain the situations:

I'm currently working on a big online database project with LAMP.

There is a database with about 10 tables, average 15 columns each.

This tables contain information about employees in an organization.

There will be lots of different reports regarding to this informations.

This is fully object oriented based programing in PHP.

So, here comes the challenge:

is it better to make on simple query to database  like :

 SELECT *, ... FROM some_table INNER JOIN ... 

and then manipulate data with PHP classes and functions to make reports

OR

in the other hand making all reports based on complicated query and relay completely on database results?

 

thank you very much in advance.

regards,

MAMAD

Link to comment
Share on other sites

Thank for reply,

 

I've just did a time checking with both ways, almost the same result???

I've just thought you are right with that but the figures are little different!!!

 

Testing execution time with objects: 0.1707

Testing execution time with query:  0.1848

 

The query prepared to get the same result, as my object oriented system, provides.

 

So any answer?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.