查看与MariaDB服务器版本相对应的手册,了解在';ECDL AND anno_formativo=2015-1


Check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ECDL AND anno_formativo = 2015-16' at line 1

我对这个字符串有问题。。。你能帮我吗?

$sql_corso="从tbl_corsi中选择titolo_corsoanno_formativo,其中titolo_corso="$titolo_corso。"AND anno_formativo="$anno_formativo。";

您需要在(基于字符串的)查询值中添加单引号:

$sql_corso = "SELECT titolo_corso, anno_formativo FROM tbl_corsi WHERE titolo_corso = '". $titolo_corso ."' AND anno_formativo = '". $anno_formativo ."'";