I'm trying to insert a TIMESTAMP into a table, but the timestamp inserted will always be X days away from now. Here is my code:
ps = c.prepareStatement("INSERT INTO tablename (uuid, pool, expires) VALUES (?, ?, DATE_ADD(NOW(), INTERVAL ? DAY)");
ps.setString(1, player.getUniqueId().toString());
ps.setInt(2, plugin.s.DEFAULT_POOL);
ps.setInt(3, plugin.s.PAYMENT_DAYS);
But when this executes a syntax error occurs. If there is a better method for doing this, or a fix for this, I'd like to know. Thanks!