Sql: ???

Results 1 to 3 of 3
  1. #1
    LETS REACH 666 POSTS?!!!! ImNotSatan is offline
    Grand MasterRank
    Apr 2013 Join Date
    google.devLocation
    573Posts

    Sql: ???

    Hey RZ, im a bit of a noob with PHP i geuss so does anny1 know whats wrong with this?

    Code:
    <?php
    $username = $_SESSION['user']['username'];
    mysql_query("INSERT INTO rooms (roomtype, caption, owner, description, category, state, users_now, users_max, model_name, public_ccts, score, tags, icon_bg, icon_fg, icon_items, password, wallpaper, floor, landscape, allow_pets, allow_pets_eat, allow_walkthrough, allow_hidewall, allow_rightsoverride, floorthickness, wallthickness, GroupId, is_picked) VALUES ('private', 'Mijn nieuwe kamermodel', '".$username."', '', '0', 'open', '0', '25', 'custom', '', '0', '', '1', '0', '0.0', '', '0.0', '0.0', '0.0', '1', '0', '0', '0', '0', '0', '0', '0', '0'")or die(mysql_error());
    ?>
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

    I really dont get it.. so yeah

    plz help :(!


  2. #2
    Newbie Equa is offline
    MemberRank
    Dec 2012 Join Date
    SwitzerlandLocation
    4Posts

    Re: Sql: ???

    Have fun =D

    Code:
    mysql_query("INSERT INTO rooms (roomtype, caption, owner, description, category, state, users_now, users_max, model_name, public_ccts, score, tags, icon_bg, icon_fg, icon_items, password, wallpaper, floor, landscape, allow_pets, allow_pets_eat, allow_walkthrough, allow_hidewall, allow_rightsoverride, floorthickness, wallthickness, GroupId, is_picked)
    VALUES ('private', 'Mijn nieuwe kamermodel', '$username', '', '0', 'open', '0', '25', 'custom', '', '0', '', '1', '0', '0.0', '', '0.0', '0.0', '0.0', '1', '0', '0', '0', '0', '0', '0', '0', '0'")or die(mysql_error());

  3. #3
    LETS REACH 666 POSTS?!!!! ImNotSatan is offline
    Grand MasterRank
    Apr 2013 Join Date
    google.devLocation
    573Posts

    Re: Sql: ???

    Quote Originally Posted by Equa View Post
    Have fun =D

    Code:
    mysql_query("INSERT INTO rooms (roomtype, caption, owner, description, category, state, users_now, users_max, model_name, public_ccts, score, tags, icon_bg, icon_fg, icon_items, password, wallpaper, floor, landscape, allow_pets, allow_pets_eat, allow_walkthrough, allow_hidewall, allow_rightsoverride, floorthickness, wallthickness, GroupId, is_picked)
    VALUES ('private', 'Mijn nieuwe kamermodel', '$username', '', '0', 'open', '0', '25', 'custom', '', '0', '', '1', '0', '0.0', '', '0.0', '0.0', '0.0', '1', '0', '0', '0', '0', '0', '0', '0', '0'")or die(mysql_error());
    Same error :/



Advertisement