refactor table names
This commit is contained in:
parent
eadc4fe443
commit
77cc24bd29
2 changed files with 16 additions and 8 deletions
4
ajax.php
4
ajax.php
|
@ -32,7 +32,7 @@ switch($_GET["action"]) {
|
|||
case "add_found":
|
||||
if (hasval($_POST["was"]) && hasval($_POST["wann"]) && hasval($_POST["wo"])) {
|
||||
/* Prepared statement, stage 1: prepare */
|
||||
if (!($stmt = $mysqli->prepare("INSERT INTO items(was, wann, wo) VALUES (?, ?, ?)"))) {
|
||||
if (!($stmt = $mysqli->prepare("INSERT INTO found_items(was, wann, wo) VALUES (?, ?, ?)"))) {
|
||||
$errormsg = "Prepare failed: (" . $mysqli->errno . ") " . $mysqli->error;
|
||||
}
|
||||
if (!$stmt->bind_param("sss", $_POST["was"], $_POST["wann"], $_POST["wo"])) {
|
||||
|
@ -49,7 +49,7 @@ switch($_GET["action"]) {
|
|||
case "add_lost":
|
||||
if (hasval($_POST["was"]) && hasval($_POST["wann"]) && hasval($_POST["wo"]) && hasval($_POST["contact"])) {
|
||||
/* Prepared statement, stage 1: prepare */
|
||||
if (!($stmt = $mysqli->prepare("INSERT INTO lost(was, wann, wo, contact) VALUES (?, ?, ?, ?)"))) {
|
||||
if (!($stmt = $mysqli->prepare("INSERT INTO lost_items(was, wann, wo, contact) VALUES (?, ?, ?, ?)"))) {
|
||||
$errormsg = "Prepare failed: (" . $mysqli->errno . ") " . $mysqli->error;
|
||||
}
|
||||
if (!$stmt->bind_param("ssss", $_POST["was"], $_POST["wann"], $_POST["wo"], $_POST["contact"])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue