Error Code: 1093. Table 't_co_dept' is specified twice, both as a target for 'INSERT' and as a separate source for dataINSERT INTO `t_co_dept` VALUES( (select max(dept_seq + 0) + 1 from t_co_dept ) );위 에러는 해당 테이블에서의 조회된값을 바탕으로 해당테이블을 조작하면 안된다는것 INSERT INTO `t_co_dept` VALUES( (select dep from (select max(dept_seq + 0) + 1 as dep from t_co_dept ) a)위와 같이 별칭을 정해주고 서브쿼리를 이용하면 가능하다
데이터를 받을때 그데이터의 타입이 잘못된것인지 확인할 필요가있다 import PropTypes from 'prop-types' class Movie extends Component { static propTypes = { title: PropTypes.string.isRequired, // PropTypes가 기본으로 있는 타입이아니라서 에러가남 타입을 check를 함 데이터통신하다 이상한 타입이들어올수있으니 poster: PropTypes.string }; render(){ // html을 리턴해주는놈 return( {this.props.title} ); }} propTypes를 이용하여 받을 데이터의 타입을 지정해줄수있다 string이 아닌 다른 데이터타입이 오면 에러가 발생 isRequired를 붙..
npm install -g create-react-app 을 쳐서 설치하려할때 npm WARN npm npm does not support Node.js v10.15.3 등 설치가 되지않아 create-react-app helloworld를 쳤을때 인식하지 못할경우 npm을 제거후 다시 설치 Mac: sudo npm uninstall -g npm Windows: npm uninstall -g npm 위 코드 실행후 다시 npm install -g create-react-app 설치