Respaldo parcial de tablas MySQL

En ocasiones ocupamos realizar un respaldo de alguna tabla gigante y en definitiva no es opción hacer un respaldo completo, para llevar acabo dicha tarea he pensado en una solución alternativa a mysqldump y es la siguiente:

Crear una tabla con diferente nombre pero misma estructura que la tabla a respaldar, cuando este lista solo realizamos la siguiente consulta:

 SQL | 
 
 copy code |
?

  1. INSERT INTO tbl_espejo (campo1, campo2) SELECT campo1, campo2 FROM tbl_original

y si queremos podemos hacer mas un respaldo parcial mas filtrado podemos incluir la lcausual where de la siguiente manera:

 SQL | 
 
 copy code |
?

  1. INSERT INTO tbl_espejo (campo1, campo2) SELECT campo1, campo2 FROM tbl_original where campoN= 'valor' and campoN2 = 3 order by campoN3 desc

salu2

How to disable notice and warning in PHP.ini file

Several times, I have  some warnings or Notices from my web php apps then I find a solution to fix this issue.

Sometime if you are working on some php code and fed up of Warnings or Notices in the browser then easy way out is to disable the settings in PHP.ini file. This is a configuration file which is loaded each time you start your PHP+Apache. It was doing everything it was supposed to but at the same time it was throwing errors and warning which doesn’t make sense and were harmful for the application.

Here is the method to change the settings in PHP.ini file:

Open PH.ini file.

In this file search for the phrase “ error_reporting = E_ALL” ,[without inverted commas]

Here replace this with “error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING “

(Show all errors, except for notices and coding standards warnings)

Make sure you change the real enabled part of this , there are certain other examples given in the file.

Restart your PHP + Apache

Now, no warnings and messages will appear in the browser.

via > zoomtemplate