Results 1 to 10 of 10

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User a4kata_pz's Avatar
    Join Date: Jul:2008
    Location:
    Posts: 1,093

    MySQL update?

    ! , update- . , , , . id user , points .
    !

  2. #2
    Registered User fly's Avatar
    Join Date: Jun:2005
    Location:
    Posts: 803

  3. #3
    TEKIL4O's Avatar
    Join Date: Feb:2007
    Location: Rousse/Sofia
    Posts: 341
    "UPDATE table_name SET column1=value, column2=value2,... WHERE some_column=some_value"

    source
    EP 9NPA+ U (HR-05/IFX)| 4200+X2@2.8GHz (IFX-14) | 2x1GB KINGSTON (DDR430 3-4-3-6-1T@2.7V) | GB 8800GT (512MB) | WD6401AALS | CFT-750-14CS

  4. #4
    Registered User a4kata_pz's Avatar
    Join Date: Jul:2008
    Location:
    Posts: 1,093
    ........................update.php...... ..................

    <?php
    mysql_connect("localhost","xxx","xxx");
    @mysql_select_db("xxx") or die( "MySQL die");
    UPDATE nova
    SET points='0'
    ?>

    .............................. ..................

    Parse error: syntax error, unexpected T_STRING in /home/a4eka/public_html/game/update.php on line 4

    ........................................ .......................
    , "nova"!

  5. #5
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331
    Quote Originally Posted by acid_burn View Post
    ........................update.php...... ..................

    <?php
    mysql_connect("localhost","xxx","xxx");
    @mysql_select_db("xxx") or die( "MySQL die");
    UPDATE nova
    SET points='0'
    ?>

    .............................. ..................

    Parse error: syntax error, unexpected T_STRING in /home/a4eka/public_html/game/update.php on line 4

    ........................................ .......................
    , "nova"!
    .... "" .

  6. #6
    Creative destructor OgiDogi's Avatar
    Join Date: Nov:2002
    Location:
    Posts: 7,601
    Quote Originally Posted by acid_burn View Post
    ...
    UPDATE nova
    SET points='0'
    ?>
    ...

    , "nova"!
    , :

    UPDATE `nova` (`id`, `username`, `points`) SET points='0'

    , ( ):

    UPDATE `nova` (`id`, `username`, `points`) VALUES
    (1, 'user1', '0'),
    (2, 'user2', '0'),
    ...
    (n, 'usern', '0');

    .


    .. z0ne . , z0ne,

  7. #7
    Registered User a4kata_pz's Avatar
    Join Date: Jul:2008
    Location:
    Posts: 1,093
    php-o ...
    ...

  8. #8
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331
    PHP Code:
    $setPoints = @mysql_query("UPDATE `nova` SET `points` = 0");
    if(@
    mysql_affected_rows() == $setPoints ) {
       echo 
    "  !";
    } else {
          echo 
    "   !";
      } 

  9. #9
    Registered User a4kata_pz's Avatar
    Join Date: Jul:2008
    Location:
    Posts: 1,093
    z0ne!

  10. #10
    Registered User a4kata_pz's Avatar
    Join Date: Jul:2008
    Location:
    Posts: 1,093
    , , 1500

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |