mirror of
https://github.com/php/doc-ru.git
synced 2025-08-03 19:20:31 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@350139 c90b9560-bf6c-de11-be94-00142212c4b1
82 lines
2.3 KiB
XML
82 lines
2.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 18f9cbcbc404fa3161104e4f3969531f686457af Maintainer: lex Status: ready -->
|
|
<!-- Reviewed: yes Maintainer: sergey -->
|
|
|
|
<refentry xml:id="mysql-xdevapi-table.update" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>Table::update</refname>
|
|
<refpurpose>Обновить строки в таблице</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>mysql_xdevapi\TableUpdate</type><methodname>mysql_xdevapi\Table::update</methodname>
|
|
<void />
|
|
</methodsynopsis>
|
|
<para>
|
|
Обновляет столбцы в таблице.
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
&no.function.parameters;
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Объект TableUpdate; используйте метод execute() для выполнения выражения update.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Пример использования <function>mysql_xdevapi\Table::update</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$session = mysql_xdevapi\getSession("mysqlx://user:password@localhost");
|
|
|
|
$session->sql("DROP DATABASE IF EXISTS addressbook")->execute();
|
|
$session->sql("CREATE DATABASE addressbook")->execute();
|
|
$session->sql("CREATE TABLE addressbook.names(name text, age int)")->execute();
|
|
$session->sql("INSERT INTO addressbook.names values ('John', 42), ('Sam', 33)")->execute();
|
|
|
|
$schema = $session->getSchema("addressbook");
|
|
$table = $schema->getTable("names");
|
|
|
|
$table->update()->set('age',34)->where('name = "Sam"')->limit(1)->execute();
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|