Not so stable..
PHP Code:CREATE TABLE `bubblesdev`.`bid` (
`bid` INT(11) NOT NULL DEFAULT 0,
`item` INT(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`bid`)
)
ENGINE = InnoDB;
Dont like dont use, dont like gtfoPHP Code:/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package client;
import com.mysql.jdbc.Connection;
import com.mysql.jdbc.PreparedStatement;
import java.sql.SQLException;
import tools.DatabaseConnection;
/**
*
* @author Carrino
*/
public class Bid {
private int bid;
private int item;
public void setbid () throws SQLException {
Connection con = (Connection) DatabaseConnection.getConnection();
PreparedStatement ps = (PreparedStatement) DatabaseConnection.getConnection().prepareStatement("INSERT INTO bid (`bid`) VALUES (?))");
ps.setInt(1, bid);
ps.executeUpdate();
ps.close();
}
public int getbid () {
return bid;
}
public void setitem() throws SQLException {
Connection con = (Connection) DatabaseConnection.getConnection();
PreparedStatement ps = (PreparedStatement) DatabaseConnection.getConnection().prepareStatement("INSERT INTO bid (`item`) VALUES (?))");
ps.setInt(1, item);
ps.executeUpdate();
ps.close();
}
public int getitem() {
return item;
}
public void playergetitem (MapleClient c) {
c.getPlayer().gainItem(item, (short) -1);
}
}
Dont ask me what is this too.
Tell me if there's any error
And remember, leeching this will be a waste of effort.
You need to know what is this before you copy this bunch of code.



Reply With Quote


