1j0e

Untitled

May 16th, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <?php
  2.  
  3. $con = mysql_connect( "localhost","root","root" );
  4. $list = "";
  5.  
  6.  
  7. if ( !$con ){
  8.  
  9. die( 'Could not connect: ' . mysql_error() );
  10.  
  11. } else {
  12.  
  13. mysql_select_db( "lolerstream", $con );
  14.  
  15. $query = "SELECT * FROM suggestions";
  16.  
  17. $result = mysql_query( $query,$con ) or die( 'Could not execute query: ' . mysql_error() );
  18.  
  19. if ( mysql_num_rows( $result ) ) {
  20.  
  21. //while ( $row = mysql_fetch_array( $result ) ) {
  22.  
  23. //$list = $list + " <div class='suggestion'> $row['submitdate'] -\t $row['contents'] </div> \n ";
  24.  
  25. //}
  26.  
  27. } else {
  28.  
  29. die( 'Special Error: ' . mysql_error() );
  30.  
  31. }
  32.  
  33. }
  34. mysql_close($con)
  35.  
  36. ?>
Advertisement
Add Comment
Please, Sign In to add comment