Skip to content
Snippets Groups Projects
Commit e049e98e authored by Sander Olin Arild Johansen's avatar Sander Olin Arild Johansen
Browse files

Merge branch 'main' into 34-connect-fridge-backend-up-to-frontend

parents 480ec22f 7316405b
No related branches found
No related tags found
No related merge requests found
Pipeline #222341 passed
...@@ -35,7 +35,7 @@ public class BackendApplication { ...@@ -35,7 +35,7 @@ public class BackendApplication {
String myUrl = "jdbc:mysql://localhost:3306/mydatabase?createDatabaseIfNotExist=true&serverTimezone=UTC&sessionVariables=sql_mode='NO_ENGINE_SUBSTITUTION'&jdbcCompliantTruncation=false"; String myUrl = "jdbc:mysql://localhost:3306/mydatabase?createDatabaseIfNotExist=true&serverTimezone=UTC&sessionVariables=sql_mode='NO_ENGINE_SUBSTITUTION'&jdbcCompliantTruncation=false";
Connection conn = DriverManager.getConnection(myUrl, "root", "mypassword"); Connection conn = DriverManager.getConnection(myUrl, "root", "mypassword");
String sql = " insert into item (category, name, price, short_desc, weight )" String sql = " insert into item (category, name, price, short_desc, weight_per_unit)"
+ " values (?, ?, ?, ?, ?)"; + " values (?, ?, ?, ?, ?)";
PreparedStatement preparedStmtMeat = conn.prepareStatement(sql); PreparedStatement preparedStmtMeat = conn.prepareStatement(sql);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment