Updated files
This commit is contained in:
@@ -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());
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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']))
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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)";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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'";
|
||||
|
||||
@@ -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'";
|
||||
|
||||
@@ -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)";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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(?,?,?,?,?)');
|
||||
|
||||
@@ -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
@@ -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']))
|
||||
|
||||
Reference in New Issue
Block a user