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 ?

Recommended Answers

All 7 Replies

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.

Here is our whole class file for the class file having problems

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.