본문 바로가기

javascript3

php mysql update, delete, insert 결과 행 개수 알기with javascript js 안녕하세요 여러분! 크리에이트이트 메이커 입니다 .!! 오늘은 php, mysql을 사용하는 개발자 분들에게 알려드릴 내용인데요 ~ 우리 php 로 mysql연동하면 select값은 다 나오지만, update, delete같은 그냥 수정하거나 추가하는 것에대해서는 잘 참고 하지 않잖아요~ 하지만 제품을 제작하다보면 몇개의 행이 update되고 delete됐는지 확인해야 할 때가 있는데요~ 그럴때 사용할 코드 알려드릴게요~ if($result = mysqli_query($conn,$sql)){ $result_array[] = $conn->affected_rows; echo json_encode($result_array); }else{ echo mysqli_error($conn); } 자 보시면 $conn은.. 2024. 1. 15.
stripe api my doc javascript(js) with nodejs https://stripe.com/docs/checkout/quickstart Stripe-hosted page stripe trigger ▶️ [event] stripe.com This link is simple api code with nodejs ↑ in there app.post('/create-checkout-session', async (req, res) => { const session = await stripe.checkout.sessions.create({ line_items: [ { // Provide the exact Price ID (for example, pr_1234) of the product you want to sell price: '{{PRICE_ID}}', quantit.. 2023. 12. 17.
multer 사용시에 [Violation] handler took 발생 현상 원인 및 조치 자바스크립트 1. 안녕하세요 여러분. 크리에이트메이커 입니다. 오늘은 html 자바스크립트를 이용하면서, 서버에 이미지 업로드에 필요한 모듈인 multer에 대해 이야기 해보겠습니다. 먼저 multer은 흔히 이미지를 서버에 업로드 할때, 많이 사용되는 nodejs의 모듈중 하나 입니다. 보통, 어떠한 가입시에 서류(파일) 첨부가 필요할 경우, 파일들을 첨부하고 가입 완료를 누를때, var storage2 = multer.diskStorage({ //경로 설정 destination: function (req, file, cb) { fs.readdir("./public/companyimages/" + req.body.companynum + "/" + req.body.submanagerid, (error) => { if (e.. 2023. 8. 30.