Updated files

This commit is contained in:
RobinNixon
2021-04-18 11:18:28 +01:00
parent aefe77f6e8
commit f63a81074d
187 changed files with 1694 additions and 254 deletions
+2 -2
View File
@@ -5,8 +5,8 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
?>
+2 -2
View File
@@ -5,9 +5,9 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
$query = "SELECT * FROM classics";
+2 -2
View File
@@ -5,9 +5,9 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
$query = "SELECT * FROM classics";
+2 -2
View File
@@ -5,9 +5,9 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
if (isset($_POST['delete']) && isset($_POST['isbn']))
+2 -2
View File
@@ -5,9 +5,9 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
$query = "CREATE TABLE cats (
+2 -2
View File
@@ -5,9 +5,9 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
$query = "DESCRIBE cats";
+2 -2
View File
@@ -5,9 +5,9 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
$query = "DROP TABLE cats";
+2 -2
View File
@@ -5,9 +5,9 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
$query = "INSERT INTO cats VALUES(NULL, 'Lion', 'Leo', 4)";
+2 -2
View File
@@ -5,9 +5,9 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
$query = "SELECT * FROM cats";
+2 -2
View File
@@ -5,9 +5,9 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
$query = "UPDATE cats SET name='Charlie' WHERE name='Charly'";
+2 -2
View File
@@ -5,9 +5,9 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
$query = "DELETE FROM cats WHERE name='Growler'";
+2 -2
View File
@@ -5,9 +5,9 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
$query = "INSERT INTO cats VALUES(NULL, 'Lynx', 'Stumpy', 5)";
+2 -2
View File
@@ -5,9 +5,9 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
$query = "SELECT * FROM customers";
+2 -2
View File
@@ -5,9 +5,9 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
$user = mysql_fix_string($pdo, $_POST['user']);
+2 -2
View File
@@ -5,9 +5,9 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
$stmt = $pdo->prepare('INSERT INTO classics VALUES(?,?,?,?,?)');
+2 -2
View File
@@ -5,9 +5,9 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
$user = mysql_entities_fix_string($pdo, $_POST['user']);
+2 -2
View File
@@ -5,9 +5,9 @@
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
catch (PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
if (isset($_POST['delete']) && isset($_POST['isbn']))