为什么需要特定的语法才能将数据插入 postgresql

Why do you need a specific syntax to insert data into postgresql

我找到了一种使用 php 将数据插入 postgresql 数据库的方法。因此,我使用了以下语法:

$sql = "INSERT INTO genes 
        (id,gene,plasmid,accessionnumber,plasmidname) 
        VALUES ('".$var_id."','".$var_gene."','".$var_ACC."','".$var_PN."')";

为什么必须在引号中使用引号并在变量前后添加一个点?

问题的答案是点连接您的字符串,引号用于将文字与变量分开。 (王俊)