Jump to content

This code is php 4?


Monkuar

Recommended Posts

For some reason this stupid code is bringing up a white blank WSOD, no apache logs or nothing, running php 5 on my server.

 

function fetch_row($query_id = "") {
    
    	if ($query_id == "")
    	{
    		$query_id = $this->query_id;
    	}
    	
        $this->record_row = mysql_fetch_array($query_id, MYSQL_ASSOC) ;
        
        return $this->record_row;
        
    }

 

How can I make this php5 compatible? Thank you

Link to comment
https://forums.phpfreaks.com/topic/250721-this-code-is-php-4/
Share on other sites

  Quote

The only PHP function that code is mysql_fetch_array and that function works in both PHP4 and PHP5. So, it is already compatible for PHP5.

 

http://php.net/manual/en/function.mysql-fetch-array.php

 

Okay, Sorry I think I might have gave the wrong information, I am still getting WSOD though, and I get no apache error logs, or nothing.  Really making me eager to learn more about this php.

 

Link to comment
https://forums.phpfreaks.com/topic/250721-this-code-is-php-4/#findComment-1286327
Share on other sites

  Quote

The only PHP function that code is mysql_fetch_array and that function works in both PHP4 and PHP5. So, it is already compatible for PHP5.

 

http://php.net/manual/en/function.mysql-fetch-array.php

 

This is partially incorrect. PHP5 is no longer bundled with MySQL - that doesn't mean it wasn't enabled when PHP was built.

http://www.php.net/manual/en/faq.databases.php#faq.databases.mysql.php5

 

Again though, this would throw an error message, which would probably be found using requinix's solution.

Link to comment
https://forums.phpfreaks.com/topic/250721-this-code-is-php-4/#findComment-1286413
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.