nabend, es geht um den nachfolgenden code, weiß jemand wie ich es funktionsfähig machen kann?
gibt folgenden Fehler aus:
Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?'
mit folgendem code funktioniert es, jedoch ist da kein prepared statement drinne:
LG
PHP-Quellcode
- // Prepare a statement to retrieve table names containing 'sammlungen'
- $stmt = $conn->prepare("SHOW TABLES LIKE ?");
- // Define the parameter with a wildcard pattern
- $pattern = '%sammlungen%';
- // Bind the parameter to the statement
- $stmt->bind_param("s", $pattern);
- // Execute the statement
- $stmt->execute();
- // Store the results in an array
- $result = $stmt->get_result();
- $tables = array();
gibt folgenden Fehler aus:
Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?'
mit folgendem code funktioniert es, jedoch ist da kein prepared statement drinne:
LG
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „Visual_Prog“ ()