0
내 코드가 정확하고 데이터베이스 쿼리 나 연결에 오류가없는 문제가 있습니다. "ErrorNumber 0 : ..." 하지만 phpMyAdmin을 확인하면 명확하게 쿼리되지 않았습니다. 나는 내 모든 제목과 테이블 이름, 데이터베이스 이름을 확인하고 모든 것이 좋습니다. 내 쿼리가 실행되거나 삽입되지 않습니다. 여기 내 코드는 다음과 같습니다.Mamp phpMyAdmin 테이블 쿼리
mysql_connect('localhost', 'root', 'root', 'aliendatabase');
if (!$dbc) {
die('Error connecting to MySQL server.' . mysql_error());
}
$query = "INSERT INTO aliens_abduction(first_name, last_name, when_it_happened, how_long, how_many, alien_description, what_they_did, fang_spotted, other, email)" .
"VALUES('$first_name', '$last_name', '$when_it_happened', '$how_long', '$how_many', '$alien_description', '$what_they_did', '$fang_spotted', '$other', '$email')";
mysql_query($query, $aliendatabase);
echo "error number" . mysql_errno() . ": " . mysql_error() . "\n";
echo 'Connected Successfully';
mysql_close($dbc);