The problem is that it gets stuck on

public static void queryChange(String string) {
        System.out.println("Sending Query: "+string);

        try{
            System.err.println("queryChange 1");
            Connect();
            System.err.println("queryChange 2");
            [COLOR="red"]conn.createStatement().executeUpdate(string);[/COLOR]
            System.err.println("queryChange 3");
        }catch(Exception e){
            System.out.println("SQLException: " + e.getMessage());
        }
        System.out.println("Sent Query: "+string);
    }

java doesnt error it just gets stuck.

Sent Query: UPDATE `servers` SET `playersCurrent` = '1' WHERE `id` = '1' ;
works fine.

Sending Query: INSERT INTO `players` (`uid`) VALUES ('1');
just sits there

i have tried

INSERT INTO `players` (`uid`) VALUES ('1');
in phpmyadmin and works fine

does anyone know what causes this/ anyone else has this problem

Fixed :)

if anyone else gets this problem its because there is fields that dont have a default set, if you dont want one to be put in set default to NULL or as defined with nothing in there

it seems the mysql api for java has some problems with no values being set because everything else ive seen dont care

anyway thanks if anyone looked into it

:)

ill probly be back, with error l8er lol

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.