B
B
Bodya_idiot2020-05-25 23:28:59
PHP
Bodya_idiot, 2020-05-25 23:28:59

Error Uncaught PDOException: SQLSTATE[42S02]:?

Here is the error:

Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rests.rests' doesn't exist in /home/.../.../.../....php

Writes that the table was not found, although he specified everything correctly, while everything worked fine, but made changes, and stopped working, and double-checked everything a hundred times, still writes the table was not found, what to do, help pliz
CODE:

$pdo = getpdo( );

$stmt = $pdo->prepare("TRUNCATE TABLE `rests`");
$stmt->execute();
$stmt = $pdo->prepare("
INSERT INTO
`cg_rests`(
`Name`,
`Link`,
`Kitchen`,
`Price_min`,
`Price_max`,
`Extra`
) VALUES (
:Name,
:Link,
:Kitchen,
:Price_min,
:Price_max,
:Extra
)
");

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
galaxy, 2020-05-25
@Bodya_idiot

Em...


$stmt = $pdo->prepare("TRUNCATE TABLE ` rests `");
$stmt->execute();
$stmt = $pdo->prepare("
INSERT INTO
` cg_rests `(
`Name`,

you already decide.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question