このコード行の $1 と $2 はどういう意味ですか? それらは変数ですか?しかし、それらを文字列で使用するにはどうすればよいでしょうか?
$query = "select * from php_project.student where student_num=$1 and student_pass=$2";
編集:次の数行は次のとおりです。
$stmt = pg_prepare($dbconn,"ps",$query);
$result = pg_execute($dbconn,"ps",array($studentnum,$password));
if (!$result){
die("error in SQL query:".pg_last_error());
}