final public function result($sql)
{
    return $this->mysql['result']($this->mysql['query']($sql, $this->connection), 0);
}

Anyone got any idea how to best fix this error ?
Member Avatar

What is it supposed to do?
You seem to be calling a property array item ($this->mysql['result']). But I can't see that this is right.

return $this->mysql->result($this->mysql->query($sql, $this->connection), 0);

I have no idea, but something like that?

Or even:

$this->mysql->result = ($this->mysql->query($sql, $this->connection), 0);
return $this->mysql->result;

Explanation please.

Member Avatar

I'm assuming you need a:

private $mysql;

for the class?

You seem to be using variable functions. Didn't see that coming. :)

Thanks that fixed the error that we had.

Member Avatar

OK, mark as solved.

Still doing the same exact thing.

Disabled PHP errors so it don't show.

Member Avatar

Ok, the procedural counterpart would be this:

return mysql_result(mysql_query("SELECT * FROM table"),0);

That's perfectly valid. Your query should be returning a resource, but it seems that you're getting an integer/boolean. This will be because your SQL is wrong. Nesting functions like this make it difficult to debug.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.