2moons 1.3v ~ 1.6v PDO change question

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • 2moons 1.3v ~ 1.6v PDO change question

      2moons 1.3v Download

      Is it possible to change to PDO because the 2moons(1.3 ~ 1.6v)version is outdated and vulnerable to security?

      currently my code(example)

      $ownerid = request_var('inpiudata', '');
      $Plane = $db->query("SELECT * FROM ".PLANETS." WHERE id_owner = '".$ownerid."' ;");


      What do I need to fix and add so that it doesn't compromise security?

      Is it possible like below? (example)
      $sql = $db->query("SELECT * FROM ".PLANETS." WHERE ownerID = :ownerid;");
      $Sho = $db->select($sql, array(
      ':ownerid' => $ownerid
      ));


      $db->update($sql, array(
      ':ownerid' => $ownerid
      ));

      $db->install($sql, array(
      ':ownerid' => $ownerid
      ));
      ....
      ...
      ...
      --------------------------------------------------------------------------------------