PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
pinehead18
Forum Contributor
Posts: 329 Joined: Thu Jul 31, 2003 9:20 pm
Post
by pinehead18 » Sat Aug 21, 2010 9:11 pm
Any thoughts as to why
Code: Select all
function Query($sql)
{
$this->Result = mysqli_query($this->link_id,$sql);
$this->query = $sql;
return $this->Result;
}
function FetchArray() {
$this->Record = mysqli_fetch_array($this->Result,MYSQLI_ASSOC);
return $this->Record;
}
$db = new MySQL();
$result = $db->query("SELECT * FROM users WHERE id=1 AND user_id=1");
while($row = $db->FetchArray($result)) {
echo "" . $row['chain_id'];
echo "<br /><br />";
causes
Fatal error: Call to undefined method MySQL::Error()
Thanks
requinix
Spammer :|
Posts: 6617 Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA
Post
by requinix » Sat Aug 21, 2010 10:25 pm
Congratulations! You gave us code that is (a) incomplete, and (b) has absolutely nothing to do with the error you described.
So beyond
That error means you tried to call a method that doesn't exist.
I don't know what to say.