[Solved] I can create a student but it doesn’t save on mysql table. i get a console error that i can figure it out what it is [closed]

Introduction

If you are having trouble creating a student and saving it to a MySQL table, you have come to the right place. This post will provide you with a solution to your problem. We will discuss the console error you are receiving and how to troubleshoot it. By the end of this post, you should have a better understanding of the issue and be able to resolve it.

Solution

The first step is to check the error message in the console. This will give you a better idea of what the issue is. Once you have identified the issue, you can then look into the code to see what is causing the problem. You may need to debug the code to find the exact issue. Once you have identified the issue, you can then look into the code to see what needs to be changed in order to fix the problem.


count the columns in your statement! There are seven columns but six values:

INSERT INTO alumnos(legajo,nombre,apellido,curso,dni,edad,fechanc) "
          + "VALUES(?,?,?,?,?,?)");

you easily forgott a questionmark(column place holder) try this:

INSERT INTO alumnos(legajo,nombre,apellido,curso,dni,edad,fechanc) "
          + "VALUES(?,?,?,?,?,?,?)");

solved I can create a student but it doesn’t save on mysql table. i get a console error that i can figure it out what it is [closed]


If you are having trouble saving a student to a MySQL table, it is likely due to an error in the code. To figure out what the error is, you will need to look at the console output. The console output should provide you with a detailed description of the error, which should help you to identify the issue and resolve it.

Once you have identified the issue, you can then make the necessary changes to your code to ensure that the student is saved to the MySQL table. It is important to ensure that all of the data is correctly formatted and that the correct data types are being used. Additionally, you should also check that the database connection is working correctly and that the correct permissions are in place.

If you are still having trouble saving the student to the MySQL table, you may need to contact your hosting provider or database administrator for assistance. They should be able to provide you with more detailed information about the issue and help you to resolve it.