Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = "localhost"; // your host name
- $username = "root"; // your user name to access MySql
- $password = ""; // your password to access MySql
- $database = "hvware"; // The name of the database
- //$link = mysql_connect($host,$username,$password);
- if (!$link = @mysql_connect($host,$username,$password,true))
- {die('Could not connect:'. mysql_error()); }
- @mysql_select_db($database) or die( "Unable to select database");
- $sql="SELECT * FROM testblob2";
- $result = mysql_query($sql);
- if (!$result) {
- die('Invalid query: ' . mysql_error());
- }
- while($row=mysql_fetch_assoc($result)){
- echo $row['dealname'].", ";
- echo $row['price'].", ";
- echo $row['descrip'].", ";
- echo $row['image_id']."<br>";
- }
- mysql_free_result($result);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement