Ibshas25 Posted November 1, 2010 Share Posted November 1, 2010 sorry this was the actuall php code for this error... <?php require_once "DataObject.class.php"; class LogEntry extends DataObject { protected $data = array( "userid" => "", "pageUrl" => "", "numVisits" => "", "lastAcces" => "", ); public static function getLogEntries( $userid ) { $conn = parent::connect(); $sql = "SELECT * FROM " . TBL_accesslog . " WHERE userid = : userid ORDER BY lastAcces DESC"; try { $st = conn->prepare( $sql ); $st->bindValue( ":userid", $userid, PDO::PARAM_INT ); $st->execute(); $logEntries = array(); foreach ( $st->fetchAll() as $row ) { $logEntries[] = new logEntry( $row); } parent::disconnect( $conn ); return $logEntries; } catch ( PDOExeception $e ) { parent::disconnect( $conn ); die( "Query failed: " . $e->getMessage() ); } } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/217469-parse-error-syntax-error-unexpected-t_object_operator-in-exportsoi-50studen/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 1, 2010 Share Posted November 1, 2010 You already have an active thread for this. Don't start another one. Quote Link to comment https://forums.phpfreaks.com/topic/217469-parse-error-syntax-error-unexpected-t_object_operator-in-exportsoi-50studen/#findComment-1129044 Share on other sites More sharing options...
Andy-H Posted November 1, 2010 Share Posted November 1, 2010 $st = conn->prepare($sql); //should be $st = $conn->prepare($sql); Quote Link to comment https://forums.phpfreaks.com/topic/217469-parse-error-syntax-error-unexpected-t_object_operator-in-exportsoi-50studen/#findComment-1129046 Share on other sites More sharing options...
Ibshas25 Posted November 1, 2010 Author Share Posted November 1, 2010 these are 2 different problems i mixed the files up as you can see if u look at both of the codes submited//// thanks andy its sorted that code out. Quote Link to comment https://forums.phpfreaks.com/topic/217469-parse-error-syntax-error-unexpected-t_object_operator-in-exportsoi-50studen/#findComment-1129048 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.