Created
July 23, 2012 21:29
-
-
Save marcmartino/3166341 to your computer and use it in GitHub Desktop.
Catchable fatal error: object of class objectCourse could not be converted to string in /objectCourse.php on line 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class objectCourse { | |
public $id; | |
public $subjectID; | |
public function loadSubjectID($mysqli) { | |
$stmt = $mysqli->prepare("SELECT `Subject ID` FROM `Courses` WHERE `ID` = ?"); | |
$stmt->bind_param('s',$this->id); | |
$stmt->execute(); | |
$stmt->bind_result($subjectID); | |
$found = false; | |
while($stmt->fetch()) { | |
$found = true; | |
$this->subjectID = $subjectID; | |
} | |
$stmt->close(); | |
return $found; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment