MySQL Archive

  • Here’s another way to connect to the databse: // Connect with username, password, etc... $link = mysqli_connect('localhost', 'userName', 'passWord'); if (!$link){ $error = 'Unable to connect to the database server.';...

    Connect To Database With mysqli_connect

    Here’s another way to connect to the databse: // Connect with username, password, etc... $link = mysqli_connect('localhost', 'userName', 'passWord'); if (!$link){ $error = 'Unable to connect to the database server.';...

    Continue Reading...

  • Simple enough…. $result = mysql_query('SELECT * FROM table1'); $num_rows = mysql_num_rows($result); $num_rows returns the number of records returned by the query….

    Count Rows / Records

    Simple enough…. $result = mysql_query('SELECT * FROM table1'); $num_rows = mysql_num_rows($result); $num_rows returns the number of records returned by the query….

    Continue Reading...

  • Another splendid idea from Mark Jackson (MJ Digital). This loops through the database and replaces a certain string with another… Ideal is a site name has been changed…. Or I...

    Find and Replace text in whole MySQL database

    Another splendid idea from Mark Jackson (MJ Digital). This loops through the database and replaces a certain string with another… Ideal is a site name has been changed…. Or I...

    Continue Reading...

Page 2 of 212