Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $location = '';
- $username = '';
- $password = '';
- $database = '';
- $connection = mysql_connect($location, $username, $password);
- if(false === $connection)
- {
- die("MySQL connection is failed.");
- }
- if(!mysql_select_db($database, $connection))
- {
- die("Database selection is failed.");
- }
- $query = mysql_query
- ("
- SELECT *
- FROM `clients`
- ");
- if(false === $query)
- {
- die("SQL query is failed.");
- }
- while($data = mysql_fetch_assoc($query))
- {
- var_dump($data);
- }
- if(mysql_free_result($query))
- {
- die("Memory cleaning is failed.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement