note 42920 added to function.mysqli-commit
| From: | mvalmeidas at bol dot com dot br | Date: | Thu, 03 Jun 2004 17:23:46 +0000 |
| Subject: | note 42920 added to function.mysqli-commit | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-70783@lists.php.net to get a copy of this message | ||
In Potuguese:
Congratulations to the people that power this site. This is the best! I would like to help
translate some things by this site to portuguese. May I help you ??? How can I do that??
Thanks!!!
Marcus Silva
I make a translate for an example to portuguese.see:
<?php
$con= mysqli_connect("localhost", "my_user", "my_password",
"test");
/* verifica conexão */
if (!$con) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
/* seta autocommit para off isso vai fazer com que só faça a transação se não houver erros*/
mysqli_autocommit($link, FALSE);
mysqli_query($con, "CREATE TABLE Language LIKE CountryLanguage Type=InnoDB");
/* Insere valores nas tabelas */
mysqli_query($con, "INSERT INTO Language VALUES ('DEU', 'Bavarian',
'F', 11.2)");
mysqli_query($con, "INSERT INTO Language VALUES ('DEU', 'Swabian',
'F', 9.4)");
/* Se chegar até aqui é por que deu tudo certo. Então pode efetuar a transação */
mysqli_commit($con);
/* fecha conexão */
mysqli_close($con);
?>
----
Manual Page -- http://www.php.net/manual/en/function.mysqli-commit.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42920
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42920&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42920&report=yes
Search -- http://master.php.net/manage/user-notes.php