일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- 17837
- git
- 백준
- 16197
- intent
- Jenknis
- 안드로이드
- 두 동전
- 프로그래머스
- github
- vscode
- activity
- mysql
- goland
- 제어반전
- Android
- data
- broadcastreceiver
- 데이터전달
- insert
- spring
- service
- 알고리즘
- Java
- Algorithm
- IntelliJ
- ubuntu
- 큐빙
- 단축키
- 데이터
- Today
- Total
목록PHP (3)
해보자
방금 삽입된 레코드 ID 가져오기 $this->db->insert_id() 쿼리 적용되는 열 수 가져오기 $this->db->affected_rows() Reference http://www.ciboard.co.kr/user_guide/kr/database/helpers.html
$mysqli->begin_transaction(); $insert1 = $mysqli->query(" > "); $insert2 = $mysqli->query(" > "); if($insert1 && $insert2) { $mysqli->commit(); } else { $mysqli->rollback(); } Reference https://stackoverflow.com/questions/25263500/how-to-insert-into-two-tables-using-php-with-transaction/25263624
composer 컴포저는 PHP의 의존성 관리도구이다. 필요한 확장 기능을 쉽게 설치해주는 제공 프로젝트에서 필요한 확장 기능을 통합해서 관리해주는 도구 download Windows 환경에서 진행했으므로 아래 링크에서 다운로드 하면 자동으로 설치된다. https://getcomposer.org/Composer-Setup.exe cmd창에 composer를 입력했을 때 상세 내용이 나온다면 설치가 잘 된 것이다. Reference https://www.lesstif.com/php-and-laravel/php-composer-23757293.html