0
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 ?
2
Contributors
7
Replies
8
Views
4 Years
Discussion Span
Last Post by diafol
0

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.

0

I'm assuming you need a:

private $mysql;

for the class?

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

Edited by diafol

0

Still doing the same exact thing.

Disabled PHP errors so it don't show.

0

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.

Edited by diafol

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.