title: I cant put user output to put it in mysql workbench whats wrong in this.Help me guys
body: <p>I cant put user output to  put it in mysql workbench whats wrong in this.Help me guys.</p>
  <pre><code>def amount_ofmoney(self):
      id_ask = int(input(&quot;Enter ur acc id:&quot;))
      result =self.checkidname(id_ask)
      while result==False:
        print(&quot;Invaild id&quot;)
      else:
        amount = int(input(&quot;Enter the amount of money u wan to put in ur acc:&quot;))
        if amount &gt; 100000:
          print(&quot;Sorry choose less amount&quot;) 
        else:
          sql = &quot;insert into bank_table(money_amount)  values(%s)&quot;
          val = (amount)
          self.mycursor.execute(sql,val)
          self.mydb.commit()
  </code></pre>
  <p>The error is like this</p>
  <blockquote>
  <p>mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
  version for the right syntax to use near '%s)' at line 1</p>
  </blockquote>