소스 검색

Added primitive ajax.php for testing

Foppe Hemminga 6 년 전
부모
커밋
d3cb99d27c
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      ajax.php

+ 1 - 4
ajax.php

@@ -36,11 +36,8 @@ function parse_data()
 	try{
 		// create a PostgreSQL database connection
 		$conn = new PDO( $dsn );
+		$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
 
-		// display a message if connected to the PostgreSQL successfully
-		if( !$conn ){
-			test_function();
-		}
 		$query_string = "UPDATE race_program
 			SET torn = TRUE
 			WHERE race_date = %s