I have created a class call Audition.php in internal libraries and when I try to pull record on grid onRecord event it throws an error
Parse error: syntax error, unexpected ‘{’ in C:\Program Files (x86)\NetMake\v81\wwwroot\scriptcase\app\LSC_data\grid_j3x_sdirectories_members\Audition.php on line 19
// Class Audition
<?php
class Audition{
protected $genre;
protected $id;
public function __construct($genre, $id) {
$this->genre = $genre;
$this->id = $id;
}
public function getMarks(){
$check_sql = "SELECT marks"
. " FROM j3x_sdirectories_auditions"
. " WHERE profile_id ='".$this->id ."' AND genre ='".$this->genre."'";
sc_lookup(rs, $check_sql);
if(isset({rs[0][0]})){
return $marks = {rs[0][0]};
}
else {
return $marks = '';
}
}
}
?>
//Method called in onRecord event in grid application
$b_g =1;
$id = {id};
$ballet = new Audition($b_g, $id);
{Ballet} = $ballet->getMarks();
anyone can tell me where it went wrong?