MYSQL | auto_increment 컬럼의 값 알아내기 | |||||
---|---|---|---|---|---|
작성자 | 작성일 | 18-03-08 15:14 | |||
테이블이름을 인자로 넣어주면... 다음에 생성될 auto_increment 컬럼의 값이 리턴 됩니다. $변수 = get_autoinc("테이블이름"); function get_autoinc($table) { global $connect; $data=mysql_fetch_array(mysql_query("show table status like '$table'")); return $data[Auto_increment]; } 바로 입력된 auto_increment 컬럼 값 $no = mysql_insert_id();
|
|||||
|
댓글목록
등록된 댓글이 없습니다.