Lose of data updating PHP and MySQL? [closed] - php

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have asked one of my hostings to update the version of PHP and MySQL and they have replied telling me to be sure I have a backup of my databases as well as of the content of the page because during the update some data can be lost.
Is this just a way to cover their back in case of any incompetent doing bad their job? Or can it really result in a potential lose of data for some reason?
I am not really on the mod of downloading all the site, which is quite big and with thousands of images, and I was wondering which are the probabilities of suffering lose of data in this operation.
Thanks.

This is a normal procedure of any hosting company to inform their clients to perfom a backup before they touch the server. I think its more to do with technology. Things can go wrong regardless of how well the person is trained. I advice you in addition to making this backup, to have a regular backup schedule for your website in case things go wrong in the future.

This is not a question that anybody can really answer here.
Normally updating the versions of php and MySQL shouldn't cause any problems but like with everything in life - it can go wrong... J
So you can never be mistaken to have a recent backup at hand.

Related

How to make HTML interact with a database? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Hello everyone, I have a project and I want to create an MVP: Minimum Viable Product.
And I have html pages ready but I don't know how to make them interact with databases, preferably MySQL.
I need the simplest way to be able to POST and GET data from a database, PHP or Rails.
IF there's just one simple tutorial or a small ebook to read, I'll be so thankful.
I have to the end of the month to create the MVP, about 20 days or so, and I really want to make that happen and I was gonna learn the whole Rails just to do that, but it'll take time you know!
Thanks for your time and I hope that you might help me :)
You can't make HTML directly interacting with database. You should create server-side application, which answer queries generated by HTML forms, JS queries, etc. I am PHP developer, I like this language, so I recommend you using it in your solution.
You can read about connecting PHP to MySQL database here:
http://www.w3schools.com/php/php_mysql_connect.asp
There you have basic information about handling data sent by POST:
http://www.w3schools.com/php/php_forms.asp
If you have any troubles during develop proccess try Google before, then if didn't find answer ask specific and well described question on Stack Overflow.
Best luck!

Create a web application for a large in php myadmin for a large firm [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am planning to create a php myadmin inventory system for a large firm (at least 1000 branches)
There will be a centralized server and database kept in one place. where all the branches can insert and retrieve data from the centralized server. there will be at least 2000 sales bill and 100 purchase bills (at least 1 gb data from a branch)
My doubt is that is it technical feasible for me to use php and mysql (apache) for this project? the data will be vast? do i need to change the front end to jsp and back end to any other database?
I dont know much about php and mysql database....? any one who went through this scenario already could help me.
I suspect this question will not stay open for long, it is way too generic, but for what its worth: yes, it is feasible, I did a similar project before.
You would have to be careful with your data schema structure, and
would need to tune mysql server quite a bit, but this is true for
any database.
You also might want to employ local servers and replication to
central server.
Your reporting server should be separate, since its workload
should not affect main data performance.
These are some thoughts that come to mind.

how to automatically repair table if crashed [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
sometimes if a table is marked as crashed, a simple
REPAIR TABLE `tablename`
works fine to continue.
how do I add an automatic repair in my PHP script?
I get the error:
1194 - Table 'whos_online' is marked as crashed and should be repaired
This is very unlikely to make sense.
If you need to repair tables so frequently that you need to automate it, there's something wrong with your setup. You need to fix the root cause in that case.
An automated solution would also be difficult to implement. You'd have to parse the mySQL error message to find out whether the reason your query failed is maybe related to a broken table. There are thousands of different possible reasons why a query could fail.
The usual way is to monitor what is going on on the web site, and having an administrator react to problems. You could, for example, have your web app send you an E-Mail when a query fails.

Is this the quickest way to execute this in PHP? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
When a visitor goes to a index.php file the following code is run. There will be only one match in the DB and then it gets it's role to include the correct page.
However, if nothing found it shows them a 404 page. I tested it and running, and I had in mind performance. In my opinion is better to have this instead of if mysql_num_rows > 0 and if { } else {}
You, with more experience than me, how do you find it ?
I gather the code above is already functioning as intended?
Contacting the database to get the user's role will take significantly longer than almost any PHP code you might write to analyze the result that you get back, so I wouldn't worry so much about the efficiency of the rest of your PHP here.
Only when you're doing a long-running calculation or writing a loop that runs many, many times should you worry about efficiency more than clarity.
If this code is run 50,000+ times a second, then maybe you're right to ask about efficiency, but if it's a few hundred thousand times a day or less, your server will never feel the difference, and your time as a coder is much more valuable than to be used thinking about this kind of optimization.

Why "not" Google App Engine? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 13 years ago.
Improve this question
I've heard of GAE and even though it doesn't support PHP, people have gotten around this limitation by using Quercus I think (I haven't tried it, but supposedly it works). But what factors should I consider when evaluating whether it's a match for me? For example, what made you not go with GAE? Or if you went with it, what are you not happy about?
thanks
Edit:
Thanks to those who saw value in the question and defended it. I've seen questions here that were much less programming-related than mine and which were left open. In terms of it being a dupe, it isn't in anyway. That other question was specifically about PHP support; mine is about why not GAE in general (the php was a sidenote). I doubt the guy that yelled "dupe" even read both questions to see how mine is obviously so much different. You can vote it reopened if you still see value in it. Some good answers were already coming in, too bad the 5 of you killed a Perfectly Good Thing. I voted for a reopen, 4 more people could hop on if interested.
Because GAE is less flexible and tightly coupled to Google's framework.

Categories