분류 전체보기
-
DATE Type Select 해서 다른 테이블에 Insert 하기Oracle 2021. 3. 2. 13:13
DATE Type data 를 Select 해서 그대로 다른 테이블에 Insert 를 하는 경우 위와 같이 시간이 없어진 data 가 Insert 된다 이와 같은 경우 DATE data 를 -> TO_CHAR() 후 -> TO_DATE() 로 저장시키면 시간을 그대로 저장할 수 있다 자세히 살펴보자 1. TO_CHAR("원하는 Column", "Column 의 Data 양식") 으로 Select 를 한다 select TO_CHAR(REQUEST_DATE,'YYYY/MM/DD AM HH:MI:SS') AS CONVERT_DATE from print_queue2 order by request_date desc; 2. 저장하고자 하는 테이블에 TO_DATE("저장할 값", "저장할 Data 의 양식") 으로 ..
-
javascript 로 radio checked 된 value 가져오기JavaScript 2020. 12. 24. 10:49
Engineer Illustrator name 이 pnt 인 radio 가 있다 javascript 로 radio 의 선택된 값을 들고오고 싶을 때 document.querySelector('input[name="radio name"]:checked').value; jquery 로 radio 의 선택된 값을 들고오고 싶을 때 $(":input:radio[name=radio name]:checked").val();
-
이전 페이지 주소값 가져오는 법PHP 2020. 12. 23. 11:52
이전 페이지 주소값을 가져오는 방법이 있다 를 사용하면 submit 으로 넘어왔을 때 넘어오기 전 주소값을 알 수 있다
-
cookie / session 사용하기PHP 2020. 12. 16. 15:29
cookie 를 사용하는 코드를 알아보자 - time()*60*60*60 을 하면 현재시간부터 하루동안 쿠키가 남아있는다 - '/' 는 클라이언트 쪽에 저장한다는 뜻이다 저장할 쿠키를 가져와보자 쿠키 이름으로 쿠키값을 가져오면 된다 session 을 사용하는 코드를 알아보자 - session 은 클라이언트마다 고유한 id 를 가지고 있기 때문에 브라우저가 종료되면 session 도 같이 종료된다 저장한 session을 가져와보자 session 을 삭제하는 방법에는 총 3가지가 있다 1. 특정세션만 삭제하는 방법 2. 전체 세션변수 삭제 세션은 배열형태이기 때문에 새로운 배열을 넣으면 초기화가 된다 3. 전체 세션뿐만 아니라 서버에 저장된 데이터까지 제거하는 경우 사용한다 세션을 사용할 때는 session..
-
PHP parameter 및 return 지정법PHP 2020. 12. 11. 15:34
interface 를 사용해서 parameter 및 return 지정법을 알아보자 interface 를 생성해보자 interface ContractInterface { public function compare(string $str1, string $str2):bool; } parameter 의 타입은 java 와 동일하게 작성해주면 된다 return 타입은 함수 뒤에 작성해 주면된다 이 interface 를 구현하는 클래스를 작성해보자 class Concreate implements ContractInterface { public function compare(string $str1, string $str2):bool { if($str1 === $str2) { return true; } else { r..
-
require_once, namespace : import 시키는 방법PHP 2020. 12. 11. 10:03
PHP 에서 원하는 php 파일을 가져오기 위해서 require_once 와 namespace 를 사용한다 require_once 를 사용할 경우 php 파일을 하나씩 import 할 수 있다 greeting.php 를 import 시킬 수 있다 namespace 를 사용할 경우 (java 에서 package 와 같다) 여러 php 파일을 import 할 수 있다 class 2개를 생성하고 greeting 이라는 부모 namespace 에 en, ko 로 자식 namespace 를 두어서 사용했다