Advertisement
Guest User

Untitled

a guest
Sep 10th, 2017
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php
  2. $host='127.0.0.1';
  3. $user='root';
  4. $pass='1234';
  5. $db='practice';
  6.  
  7.  
  8. if($link= mysqli_connect($host,$user,$pass,$db))
  9. {
  10. echo "connected successfully";
  11. }
  12.  
  13.  
  14.  
  15. ?>
  16.  
  17. <?php
  18. include('db_connection.php');
  19. $table="studentinfo";
  20.  
  21. $query =" SELECT 'name' from $table ";
  22. $result=mysqli_query($link,$query);
  23. if(false===$result)
  24. {
  25. printf("error: %sn",mysqli_error($link));
  26. }
  27.  
  28. ?>
  29.  
  30. connected successfullyerror: Table 'practice.studentinfo' doesn't exist
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement