Working with MySQL databases from PHP

If like me, you often forget what your database tables are called, or need to check if a MySQL table has been created successfully, but don’t have access to a handy control panel or interface, you may need to write a small PHP script to fetch the results you need. Here are a few that I find myself using time and time again:

Connect to your MySQL database

Get a list of all tables in a database

";
}
?>

Get a list of all data in a table

";
}
?>

Leave a Reply

Your email address will not be published. Required fields are marked *