eliminar * de la tabla no funciona [cerrado]
Estoy tratando de borrartodas las filas Desde la mesa pero no funciona. Cuando lo hagoecho $mydb->error;
me da lo siguiente:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM messages where from_user = ? and id = ?'
$user = 'currentuser';
if (isset($_POST['delete'])) {
if(!empty($_POST['id'])){
$id = $_POST['id'];
$mydb = new mysqli('localhost', 'root', '', 'database');
$stmt = $mydb->prepare("DELETE * FROM messages where from_user = ? and id = ? ");
echo $mydb->error;
$stmt->bind_param('ss', $user, $id);
foreach ($_POST['id'] as $id) {
$stmt->execute();
}
echo"The Message deleted permanently";
}
}