Deleted MySQL table by mistake regenerate by PHP
The condition is you should have the values of the database stored in a string, Hey don’t make that face it is not that bad. There is a chance that you have the data written somewhere. For example assume the table deleted had details of all employees like name, telephone no++, so there is a chance that this info was initially saved in a word or excel document. All you have to do is cut paste the data and save it as a string like the way I have mentioned below.
Example
Here is an example to populate a languages table:
It is useful when you have a junk of values and no time or patience to sit and retype or copy paste:
$j=0;
for ($i=0;$i<47;$i++)
{
for($j=$j;$j<$i; $j++)
{
echo “INSERT INTO `languages` ( `sno` , `languages` ) VALUES (’$i’, ‘$arr[$j]‘);”.”";
}
}