<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: masmithrpg</title>
    <description>The latest articles on DEV Community by masmithrpg (@masmithrpg).</description>
    <link>https://dev.to/masmithrpg</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F107551%2F791eaf34-82f6-43a3-bbaa-3aeb55886226.png</url>
      <title>DEV Community: masmithrpg</title>
      <link>https://dev.to/masmithrpg</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/masmithrpg"/>
    <language>en</language>
    <item>
      <title>Beginner Node Help- take 2</title>
      <dc:creator>masmithrpg</dc:creator>
      <pubDate>Mon, 15 Oct 2018 18:40:43 +0000</pubDate>
      <link>https://dev.to/masmithrpg/beginner-node-help--take-2-14pg</link>
      <guid>https://dev.to/masmithrpg/beginner-node-help--take-2-14pg</guid>
      <description>&lt;p&gt;I am very new at HTML, NODE, PUG, etc. I'm trying to build a golf&lt;br&gt;&lt;br&gt;
             score application.  I have created the first part that allows me to &lt;br&gt;
             CRUD the courses.  This part is working. &lt;br&gt;
             I have 2 tables,  courses and scores.&lt;br&gt;&lt;br&gt;
             After displaying a list of courses, i select a course and load 6 &lt;br&gt;
             blank HTML table records to allow entry of golfers and scores each of &lt;br&gt;
             the 18 holes.&lt;br&gt;
             Now is where i'm confused and need some guidance.&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;         in my .pug file, how do i display an output field that displays a 
         running total of my score?

         On my submit button, i'm not getting to my POST, but i cannot figure 
         out why

         I want to be able to hit save on this screen and either Insert or 
         Update, depending on whether i have already saved.  Should that be 
         handled within a single POST?  It seems like i should, but i don't 
         know enough about Node to know

         I am processing my courses and scores within a single index.js file.  
         Should i be separating the courses/holes into separate .js files?

         Thats enough for now
         Thanks for any guidance you can provide

        app.get('/scores/keepscore', function(req, res) {
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;res.render('scores/keepscore', { title: 'ScoreCard' ,form_action: &lt;code&gt;/scores/update&lt;/code&gt;})&lt;br&gt;
})&lt;br&gt;
app.post('/scores/update', function(req, res) {&lt;br&gt;
console.log('i got to the update')&lt;br&gt;
let stmt = new db.dbstmt(dbconn)&lt;br&gt;
console.log(req)&lt;br&gt;
  var sql = &lt;br&gt;
      &lt;code&gt;INSERT INTO ${schema}.SCORECARD (COURSE,GOLFER, GDATE, HOLE1,HOLE2,HOLE3,HOLE4, HOLE5, HOLE6, HOLE7, HOLE8, HOLE9, HOLE10, HOLE11, HOLE12, HOLE13, HOLE14, HOLE15, HOLE16, HOLE17, HOLE18)&lt;br&gt;
       VALUES ('${req.body.COURSE}','${req.body.GOLFER}',CURRENT_DATE, ${req.body.HOLER1}, ${req.body.HOLE2}, ${req.body.HOLE3},${req.body.HOLE4}, ${req.body.HOLE5}, ${req.body.HOLE6},&lt;br&gt;
       ${req.body.HOLE7}, ${req.body.HOLE8}, ${req.body.HOLE9},${req.body.HOLE10}, ${req.body.HOLE11}, ${req.body.HOLE12},${req.body.HOLE13}, ${req.body.HOLE14}, ${req.body.HOLE15},&lt;br&gt;
       ${req.body.HOLE16}, ${req.body.HOLE17}, ${req.body.HOLE18} ) with NC&lt;/code&gt;&lt;br&gt;
  stmt.exec(sql, function(result, err){&lt;br&gt;
  console.log(err)&lt;br&gt;
    res.redirect('/scores/keepscore')&lt;br&gt;
     stmt.close()&lt;br&gt;
  })&lt;br&gt;
})&lt;/p&gt;

</description>
      <category>node</category>
      <category>pug</category>
      <category>express</category>
      <category>html</category>
    </item>
    <item>
      <title>Beginner Node Help</title>
      <dc:creator>masmithrpg</dc:creator>
      <pubDate>Mon, 15 Oct 2018 17:43:56 +0000</pubDate>
      <link>https://dev.to/masmithrpg/beginner-node-help-19jk</link>
      <guid>https://dev.to/masmithrpg/beginner-node-help-19jk</guid>
      <description>

</description>
      <category>node</category>
      <category>pug</category>
      <category>express</category>
      <category>html</category>
    </item>
  </channel>
</rss>
