Parser Eror: Syntax Error, Unexpected ‘scriptcase’
It is just like that Scriptcase does not expect scriptcase. I don’t know how to explain this report.
I created an array that contains the years relating to the field of a table. The idea is to automatically update all the lines of the table with a value that starts from 0 to each change of year.
I create the array:
$Sql=‘SELECT YEAR(DataOperazione) Anno FROM nc GROUP BY Anno’;
sc_lookup(my_data,$Sql);
I perform an SQL script for each year found and write an Nr field with the YY-NN format
if ({my_data} === false) {
echo “Access error. Message=”. {my_data_error} ; }
elseif (empty({my_data})) {
echo “Select command didn’t return data”; }
else { foreach({my_data} as $i => $item) {
$Sql=‘SET @RowId:=0’;
sc_exec_sql($Sql);
$Sql='UPDATE nc SET Nr=CONCAT(DATE_FORMAT(DataOperazione,"%y"),"-",LPAD(@RowId:=@RowId+1,2,“0”)) WHERE DATE_FORMAT(DataOperazione,"%y") = {my_data}[$i][0];
echo “
\t – \t” . {my_data}[$i][0];
}
}
This is what I get
Parse error: syntax error, unexpected ‘scriptcase’ (T_STRING) in C:\Program Files\NetMake\v9\wwwroot\scriptcase\app\Parravicini_Tablet\grid_nc_2\grid_nc_2.php on line 986