The structure of my table:
id int AUTO_INCREMENT PRIMARY KEY
title text
url text
age int
Here's how I am trying to save data into this table:
PreparedStatement ps=con.prepareStatement("insert into table(title, url, age) values ('\"+title+\",\"+url+\",\"+age+\"')");
System.out.println("Connected database successfully..");
ps.executeUpdate();
But when I run the app, I get
java.sql.SQLException: Column count doesn't match value count at row 1
I guess the problem might be in the id column, how to solve it?