This is my partial plugin code:
I get this error: Call to a member function simple_select() on a non-object
I get this error: Call to a member function simple_select() on a non-object
$ids = $_GET['case'];
$emailr = $db->real_escape_string($_GET['email']);
//...
function readerthread_thread($emailr, $db)
{
global $db, $mybb;
$query = $db->simple_select("SELECT * FROM ".TABLE_PREFIX."users WHERE email='$emailr'");
while($row = $db->fetch_array($query));
{
echo $row['postnum'];
}
}
switch($ids)
{
case thread: readerthread_thread($emailr, $db); break;
}