Skip to content

Commit

Permalink
Use PDO datatype Constants in queries using bindPrams
Browse files Browse the repository at this point in the history
  • Loading branch information
thekabal committed Feb 13, 2017
1 parent cae0cbd commit a4bbe81
Show file tree
Hide file tree
Showing 51 changed files with 63 additions and 63 deletions.
2 changes: 1 addition & 1 deletion attack.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion beacon.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion bounty.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion classes/Bases.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static function buildBase(\PDO $pdo_db, array $langvars, int $planet_id,
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(\PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion classes/Character.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static function getInsignia(\PDO $pdo_db, string $a_username, array $lang
// Lookup players score.
$sql = "SELECT score FROM ::prefix::ships WHERE email =:email";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $a_username);
$stmt->bindParam(':email', $a_username, \PDO::PARAM_STR);
$stmt->execute();
Db::logDbErrors($pdo_db, $sql, __LINE__, __FILE__);
$res = $stmt->fetch();
Expand Down
2 changes: 1 addition & 1 deletion classes/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static function auth(\PDO $pdo_db, string $lang, array $langvars, Reg $tk
{
$sql = "SELECT ip_address, password, last_login, ship_id, ship_destroyed, dev_escapepod FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch();

Expand Down
2 changes: 1 addition & 1 deletion classes/Players/PlayersGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function selectPlayerInfo(string $email)
{
$sql = "SELECT * FROM ::prefix::ships WHERE email = :email";
$stmt = $this->pdo_db->prepare($sql);
$stmt->bindParam(':email', $email);
$stmt->bindParam(':email', $email, \PDO::PARAM_STR);
$stmt->execute();
\Tki\Db::logDbErrors($this->pdo_db, $sql, __LINE__, __FILE__); // Log any errors, if there are any

Expand Down
2 changes: 1 addition & 1 deletion classes/Realspace.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static function realSpaceMove(\PDO $pdo_db, array $langvars, int $destina
{
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetchAll(\PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion classes/Ship.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static function isDestroyed(\PDO $pdo_db, string $lang, Reg $tkireg, arra
"dev_fuelscoop='N', dev_minedeflector=0, ship_destroyed='N', " .
"dev_lssd='N' WHERE email=:email";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
Db::logDbErrors($pdo_db, $sql, __LINE__, __FILE__);

Expand Down
2 changes: 1 addition & 1 deletion create_universe/80.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
$stmt->bindParam(':character_name', $tkireg->admin_name);
$stmt->bindParam(':password', $admin_hashed_password);
$stmt->bindParam(':recovery_time', $admin_recovery_time);
$stmt->bindParam(':email', $tkireg->admin_mail);
$stmt->bindParam(':email', $tkireg->admin_mail, \PDO::PARAM_STR);
$stmt->bindParam(':turns', $tkireg->start_turns);
$stmt->bindParam(':armor_pts', $tkireg->start_armor);
$stmt->bindParam(':credits', $tkireg->start_credits);
Expand Down
2 changes: 1 addition & 1 deletion defence_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion device.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion dump.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion emerwarp.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion feedback.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion galaxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion genesis.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion ibank.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
Tki\Header::display($pdo_db, $lang, $template, $title, $body_class);

$stmt = $pdo_db->prepare("SELECT * FROM ::prefix::ships WHERE email=:email");
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$result = $stmt->execute();
Tki\Db::logDbErrors($pdo_db, $result, __LINE__, __FILE__);
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);
Expand Down
6 changes: 3 additions & 3 deletions kabal_control.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,9 @@
// Tki\Db::LogDbErrors($pdo_db, $result, __LINE__, __FILE__);
$sql = "SELECT email, character_name, ship_name FROM ::prefix::ships WHERE email=:email OR character_name=:character_name OR ship_name=:ship_name";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $emailname);
$stmt->bindParam(':character_name', $character);
$stmt->bindParam(':ship_name', $shipname);
$stmt->bindParam(':email', $emailname, \PDO::PARAM_STR);
$stmt->bindParam(':character_name', $character, \PDO::PARAM_STR);
$stmt->bindParam(':ship_name', $shipname, \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetchAll(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion log.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion logout.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion lrscan.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion mailto.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
16 changes: 8 additions & 8 deletions main.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
$sql_test = Tki\Db::LogDbErrors($pdo_db, $sql, __LINE__, __FILE__);
if ($sql_test === true)
{
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);
}
Expand All @@ -61,7 +61,7 @@
// Pull sector info from database
$sql = "SELECT * FROM ::prefix::universe WHERE sector_id=:sector_id";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':sector_id', $playerinfo['sector']);
$stmt->bindParam(':sector_id', $playerinfo['sector'], \PDO::PARAM_INT);
$stmt->execute();
$sectorinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand All @@ -85,7 +85,7 @@
$i = 0;
$sql = "SELECT * FROM ::prefix::links WHERE link_start=:link_start ORDER BY link_dest ASC";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':link_start', $playerinfo['sector']);
$stmt->bindParam(':link_start', $playerinfo['sector'], \PDO::PARAM_INT);
$stmt->execute();
$link_present = $stmt->fetchAll(PDO::FETCH_ASSOC);
if ($link_present !== null)
Expand All @@ -101,7 +101,7 @@
$i = 0;
$sql = "SELECT * FROM ::prefix::planets WHERE sector_id=:sector_id";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':sector_id', $playerinfo['sector']);
$stmt->bindParam(':sector_id', $playerinfo['sector'], \PDO::PARAM_INT);
$stmt->execute();
$planet_present = $stmt->fetchAll(PDO::FETCH_ASSOC);
if ($planet_present !== null)
Expand All @@ -117,7 +117,7 @@
$i = 0;
$sql = "SELECT * FROM ::prefix::sector_defense, ::prefix::ships WHERE ::prefix::sector_defense.sector_id=:sector_id AND ::prefix::ships.ship_id = ::prefix::sector_defense.ship_id";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':sector_id', $playerinfo['sector']);
$stmt->bindParam(':sector_id', $playerinfo['sector'], \PDO::PARAM_INT);
$stmt->execute();
$defense_present = $stmt->fetchAll(PDO::FETCH_ASSOC);
if ($defense_present !== null)
Expand All @@ -133,7 +133,7 @@
// Grab zoneinfo from database
$sql = "SELECT zone_id,zone_name FROM ::prefix::zones WHERE zone_id=:zone_id";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':zone_id', $sectorinfo['zone_id']);
$stmt->bindParam(':zone_id', $sectorinfo['zone_id'], \PDO::PARAM_INT);
$stmt->execute();
$zoneinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down Expand Up @@ -161,7 +161,7 @@

if ($sql_test === true)
{
$stmt->bindParam(':recp_id', $playerinfo['ship_id']);
$stmt->bindParam(':recp_id', $playerinfo['ship_id'], \PDO::PARAM_INT);
$result = $stmt->execute();
if ($result)
{
Expand Down Expand Up @@ -506,7 +506,7 @@
// Get planet owner from database
$sql = "SELECT * FROM ::prefix::ships WHERE ship_id=:ship_id LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':ship_id', $planets[$i]['owner']);
$stmt->bindParam(':ship_id', $planets[$i]['owner'], \PDO::PARAM_INT);
$stmt->execute();
$planet_owner = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion mines.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion modify_defences.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion move.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion navcomp.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion new2.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
$flag = 0;
$sql = "SELECT email, character_name, ship_name FROM ::prefix::ships WHERE email=:email || character_name=:character_name || ship_name=:shipname";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $username);
$stmt->bindParam(':email', $username, \PDO::PARAM_STR);
$stmt->bindParam(':character_name', $character);
$stmt->bindParam(':ship_name', $shipname);
$stmt->execute();
Expand Down
4 changes: 2 additions & 2 deletions option2.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
$sql = "UPDATE ::prefix::ships SET lang=:lang WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':lang', $lang);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$lang_changed = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down Expand Up @@ -90,7 +90,7 @@

$sql = "SELECT ship_id, password FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion planet.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion planet2.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion planet3.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion planet_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion port.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
2 changes: 1 addition & 1 deletion port2.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// Get playerinfo from database
$sql = "SELECT * FROM ::prefix::ships WHERE email=:email LIMIT 1";
$stmt = $pdo_db->prepare($sql);
$stmt->bindParam(':email', $_SESSION['username']);
$stmt->bindParam(':email', $_SESSION['username'], \PDO::PARAM_STR);
$stmt->execute();
$playerinfo = $stmt->fetch(PDO::FETCH_ASSOC);

Expand Down
Loading

0 comments on commit a4bbe81

Please sign in to comment.