Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9012703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:04:24+00:00 2026-06-16T03:04:24+00:00

I am learning MySQL with JAVA, and don’t understand prepared statements. Abstracting from I

  • 0

I am learning MySQL with JAVA, and don’t understand prepared statements. Abstracting from I shall learn it, I want to ask for help in finishing this code to be “prepared stated” 🙂

String stringQuery = "INSERT INTO banlist (name, reason, admin, time, temptime, IP) VALUES (testNick, testPowod, testAdmin, CURRENT_TIMESTAMP, NOW(), NULL);=?";

PreparedStatement statement = this.connection.prepareStatement( stringQuery );
statement.setString( 1,  ); // after ' 1, ' we define what we want to get
ResultSet resultSet = statement.executeUpdate(); 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:04:25+00:00Added an answer on June 16, 2026 at 3:04 am
    String stringQuery = 
        "INSERT INTO banlist (name, reason, admin, time, temptime, IP)"
        + " VALUES (?, ?, ?, CURRENT_TIMESTAMP, NOW(), NULL)";
    
    PreparedStatement statement = this.connection.prepareStatement(stringQuery);
    statement.setString(1, testNick);
    statement.setString(2, testPowod);
    statement.setString(3, testAdmin);
    int inserted = statement.executeUpdate();
    

    Read the JDBC tutorial.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in a learning way of mysql and want help to know where
I have just started learning MySQL and am having trouble extracting matching flights from
I've been learning some PHP and MySQL from a book that teaches you how
I'm learning Java and just started playing around with mysql and am having a
I'm learning MySQL now. I need your help in understanding the difference between these
I have already installed eclipse for java/j2ee. For learning purposes, I want some database
https://i.stack.imgur.com/ZfB0c.jpg Hi everyone, I've been learning MySQL (exclusively, no experience with PHP yet) from
I am learning mysql join queries. To pratice, I decided to make tables for
I am learning mysql and I am having trouble with one of my tables
If anyone could recommend a good book for learning mySQL as well, that would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.