게시글
질문&답변
2023.05.10
강의 영상이 재생 안대네요
이어보기 기능 문제인거 같아요 다음강의 했다가 이전강의 누르시면 되요
- 1
- 3
- 284
질문&답변
2023.03.04
pymysql db data입력시 부터 진행이...
몇일 해결안되는게 질문게시글만 쓰면 하루이네 해결되네요 ㅠ workbench 를 통해 엄청간단하게 비밀번호를 바꿀 수 있네요...
- 1
- 1
- 476
질문&답변
2023.02.22
mysql 입문 질의드려요
지금 막 해결했습니다. 다른 사람들을 위해 해결방법 공유드려요. banch 다운받으실때 현재 버전 사용하시면 애러가 나네요. 다운받기전에 archives누르시고 8.0.25버전으로 받으세요~
- 0
- 1
- 555
질문&답변
2021.07.11
id 값 문제인데 해결을 못하겠습니다.
네!! 우선 web부분 function MainPage (){ const [ products , setProducts ]= React . useState ([]); React . useEffect ( function (){ axios . get ( "http://localhost:8080/products" ) . then ( function ( result ){ const products = result . data . products ; setProducts ( products ); }). catch ( function ( error ){ console . error ( '에러 발생 : ' , error ); }); },[]) return ( div > div id = "banner" > img src = "images/banners/banner1.png" /> div > h1 > 퍈매되는 상품들 h1 > div id = "product-list" > { products . map ( function ( product , index ){ return ( div className = "product-card" > Link className = "product-link" to = { `/products/ ${ index } ` } > { /* to={"/products/"+index} 를 위에 es6 문법으로 */ } div > img className = "product-img" src = { product . imageUrl } /> div > div className = "product-contents" > span className = "product-name" > { product . name } span > span className = "product-price" > { product . price } 원 span > div className = "product-seller" > img className = "product-avatar" src = "images/icons/avatar.png" /> span > { product . seller } span > div > div > Link > div > ); }) } div > div > 추가적으로 아래의 최 상단 2줄은 자동으로 추가되어 제가 주석처리했습니다. // const { DataTypes } = require("sequelize/types") // const { sequelize } = require(".") module . exports = function ( sequelize , DataTypes ){ const product = sequelize . define ( 'Product' ,{ name : { type : DataTypes . STRING ( 20 ), allowNull : false }, price : { type : DataTypes . INTEGER ( 10 ), allowNull : false }, seller : { type : DataTypes . STRING ( 30 ), allowNull : false }, description : { type : DataTypes . STRING ( 300 ), allowNull : false }, imageUrl : { type : DataTypes . STRING ( 300 ), allowNull : true } }); return product ; }
- 1
- 2
- 109