2 Replies Latest reply: Apr 7, 2013 5:20 PM by matthew stuart RSS

    MySQL error on localhost, but not remote!!

    matthew stuart Community Member

      I am getting an error of:

       

      Warning: mysql_free_result() expects parameter 1 to be resource, null given in /Users.... line 848

       

      But I am only getting this on my dev machine. It doesn't show on the remote site. I have taken the remote DB and put it inplace of my local one just in case I had inadvertantly deleted something, but still no joy.

       

      I have closed the recordset using:

      mysql_free_result($rs_reg_domain);

       

      But have had to use the following to hide the error:

      //if (is_resource($rs_reg_domain)) mysql_free_result($rs_reg_domain);

       

      and finally this is the recordset:

       

      mysql_select_db($database_conn_mrs, $conn_mrs);

      $query_rs_domain = "SELECT * FROM tbl_settings WHERE fld_settingsNAME = 'domain'";

      $rs_domain = mysql_query($query_rs_domain, $conn_mrs) or die(mysql_error());

      $row_rs_domain = mysql_fetch_assoc($rs_domain);

      $totalRows_rs_domain = mysql_num_rows($rs_domain);

       

      'domain' has a value.

       

      What's wrong?

       

      Thanks