#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    1
    Rep Power
    0

    Want to put "," at the end of my query


    Hello there,

    I would like to put "," inside my mysql query, how would i do that.

    $quete5 = mysql_query("UPDATE phpbb_users SET ".$word." = ".rand(10, 230)." WHERE username = '".$userdata['username']."'");
    I want it

    $quete5 = mysql_query("UPDATE phpbb_users SET ".$word." = ".rand(10, 230)."[here] WHERE username = '".$userdata['username']."'");
    Any help?

    Thanks
  2. #2
  3. Put a potato on it!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2008
    Location
    Maryland
    Posts
    304
    Rep Power
    970
    This isn't a PHP board, so I won't berate you for using a deprecated function, but mysql_ functions are deprecated and you should look into mysqli or PDO and all that.

    Why do you need a comma there? That will throw a syntax error in mysql - your first query is correct, unless you need to do two update statements on two different columns.
    "Those who can make you believe absurdities can make you commit atrocities."

IMN logo majestic logo threadwatch logo seochat tools logo