Jump to content

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /export/SOI-50/studen


Ibshas25

Recommended Posts

 

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() );

 

}

}

 

}

 

?>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.