Jump to content

Recommended Posts

I've noticed that there are a lot of things that can be done with either MySQL or PHP such as date stuff, math things, etc.

 

When deciding which to use, I want to consider the following:

 

1. Server performance

 

2. Site performance

 

3. programming extensibility (meaning, maybe my stuff gets big enough that I need to rewrite things to work on a multi-server setup with load balancing, mysql on a separate server, ....)

 

4. Accuracy (precision in math results)

 

What do you think?

 

At first I thought I'd rely mostly on php but having looked more at mysql, those capabilities seem really nice too

 

Many thanks  :)

Link to comment
https://forums.phpfreaks.com/topic/169780-mysql-or-php-which-is-better/
Share on other sites

It depends on what you require. If you do not need anything but the raw data pulled out...then MySQL alone would be great. If you want to make it look like a report and manipulate the data and pretty it up you will need PHP with MySQL, as they do go hand in hand to help each other.

 

But as said, if you just need it for numbers and small reports, MySQL will be fine, just the data would have to be pulled out using the command line or a script in MySQL which will only give you raw text in a table format vs having PHP pull it out and dressing it up a bit.

 

As far as accuracy on math. It is only as accurate as you code it. You code it wrong it will be off, of course. That all depends on your knowledge and skills.

 

Performance...really you cannot compare them as one is a Database and the other is a Markup/programming Language.

To be honest I've never seen as it as having to choose between the two. They do their own things, obviously some functionality can be seen as the same but you just go with the flow. I've never purposefully used MySQL for something in this sense, when the rest of the processing is done by PHP, or the other way round.

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.