It is a fundamental website. Based off solutions on here, I am carrying this out:

private $db;

public function __construct($id = null) {
    $this->db = Db::getInstance(); //singleton from the Db class

But when there's a static method, I can not make use of the object specific variable.

Can there be anything much better than needing to by hand specify the db variable within the static method?

public static function someFunction($theID){
    $db = Db::getInstance();

EDIT: Making the variable static does not solve the issue. Access to undeclared static property. I'd still need to assign the variable inside the static function. Now you ask , asking if there is a way for this.

My DB Class (while not vital that you this discussion):

class Db {
private static $m_pInstance;
private function __construct() { ... }

public static function getInstance(){
    if (!self::$m_pInstance)
        self::$m_pInstance = new Db();
    return self::$m_pInstance;
}

Yes, you may make the $db static:

static private $db;

I am presuming that's the thing you need, since you are being able to access it from the static method. If there's any reason you wouldn't like this, that has to imply that the technique most likely should not be static.

EDIT:

According to @zerkms (thanks) comments, you access static variables with self:::

self::$db = Db::getInstance(); 

You've layed out among the issues you discover when co-interacting static techniques inside a class that may also be insantiated, setting member variables via instantiation, and expecting use of their values through static method call. Really the only way for this would be to set a category specific singleton for that database singleton, or pass within the DB resist the static method.

// Option 1
class MyClass
{
    private static $db;

    public function __construct($id = null)
    {
        self::$db = Db::getInstance(); //singleton from the Db class
    }

    public static function someFunction($theID)
    {
        self::$db->query('SELECT * FROM my_table');    
    }
}

// Singleton DB for MyClass will be initalized via constructor
$myClass = new MyClass();    

// This call will have access to DB object set via class specific singleton
MyClass::someFunction(4);

// Option 2
class MyClass
{
    private $db;

    public function __construct($id = null)
    {
        $this->$db = Db::getInstance(); //singleton from the Db class

        if (!is_null($id)) {
            $this->id = $id;
        }
    }

    public function getDb()
    {
        return $this->db;
    }

    public function getId()
    {
        return $this->id;
    }

    // Sub-Option 1: If Id ISNT set via object
    public static function someFunction($object, $theID)
    {
        $object->getDb()->query('SELECT * FROM my_table WHERE id = ' . (int) $theID);    
    }

    // Sub-Option 2: If Id IS set via object
    public static function someFunction($object)
    {
        $object->getDb()->query('SELECT * FROM my_table WHERE id = ' . (int) $object->getId());    
    }
}

// Sub-Option 1 call
$myClass = new MyClass();

MyClass::someFunction($myClass, 4);

// Sub-Option 2 call
$myClass = new MyClass(4);

MyClass::someFunction($myclass);