Jump to content

[SOLVED] OOP using php defined functions


Lodius2000

Recommended Posts

In a method, are functions defined by php preceded by a @

I'm looking into the guts of a DBabstraction and seeing this

 

<?php
function simpleQuery($query)
    {
        $this->last_query = $query;
        $query = $this->modifyQuery($query);
//next line is what i'm talking about
        $result = @msql_query($query, $this->connection);
        if (!$result) {
            return $this->msqlRaiseError();
        }
        // Determine which queries that should return data, and which
        // should return an error code only.
        if ($this->_checkManip($query)) {
            $this->_result = $result;
            return DB_OK;
        } else {
            $this->_result = false;
            return $result;
        }
    }

?>

 

but then in the same document, I see this

 

<?php
function freeResult($result)
    {
        return is_resource($result) ? msql_free_result($result) : false;
    }
?>

 

now I know mysql_query and msql_free_result to be functions included in mysql enabled installs of php, so whats the diff of using the @ and not?

Link to comment
https://forums.phpfreaks.com/topic/141016-solved-oop-using-php-defined-functions/
Share on other sites

corbin... yeah saw that I had opened the wrong document, I had opened the msql not mysql, but i checked out what was in the mysql and it had the same sorts of things

 

Prismatic... that explains it because this DBA has its own error reporting

 

SOLVED

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.