Guest User

Untitled

a guest
Feb 17th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. $con = mysql_connect ("localhost","username","password");
  2. if (!$con)
  3. {
  4. die ('Could not connect:' . mysql_error()0;
  5. }
  6. mysql_select_db("db_name", $con);
  7. $result = mysql_query(Select column FROM table");
  8. while($row = mysql_fetch_array($result))
  9. {
  10. echo $row['column'];
  11. }
  12.  
  13. mysql_close($con);
  14.  
  15. SELECT * FROM table ORDER BY `id` DESC LIMIT 1
  16.  
  17. SELECT column FROM table ORDER BY `id` DESC LIMIT 1
Add Comment
Please, Sign In to add comment