Jump to content

jamesmpollard

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by jamesmpollard

  1. What does this output? $sql = "SELECT * FROM players GROUP BY player"; $result = $conn->query($sql); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_array()) { echo '<pre>' . print_r($row, true) . '</pre>'; } } else { echo "0 results"; } $conn->close();
  2. Hi Guy's Now this may be a stupid question but I was wondering if anyone could help me accomplish something. Here's what I'm trying to do (in brief). CLASSONE.PHP class one extends Core { public function __construct() { } public function atestone() { return $this; } public function __destruct() { } } CLASSTWO.PHP class two extends Core { public function __construct() { } public function atesttwo() { return $this; } public function __destruct() { } } CORE.PHP class Core{ public function __construct() { } public function testcore() { return $this->atestone(); // OR return $this->atesttwo(); } public function __destruct() { } } I'm looking to have a core class basically. Ideally, all classes can utilise other functions but my main aim is to have one core class that can use (freely) all other classes that are extended to it. Is this possible? Thanks in advance James
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.