TableDelete::where

(No version information available, might only be in Git)

TableDelete::whereDefine la condición de búsqueda para la eliminación

Descripción

public function mysql_xdevapi\TableDelete::where(string $where_expr): mysql_xdevapi\TableDelete

Define la condición de búsqueda para filtrar.

Parámetros

where_expr

Define la condición de búsqueda para filtrar los documentos o los registros.

Valores devueltos

Un objeto TableDelete.

Ejemplos

Ejemplo #1 Ejemplo de mysql_xdevapi\TableDelete::where()

<?php
$session = mysql_xdevapi\getSession("mysqlx://user:password@localhost");

$schema = $session->getSchema("addressbook");
$table  = $schema->getTable("names");

$table->delete()
  ->where("id = :id")
  ->bind(['id' => 42])
  ->limit(1)
  ->execute();

?>
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top