Created
January 29, 2018 15:57
-
-
Save oneberto/291969c2e748f3dffdeb86100f0f3d36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$servidor = 'localhost'; | |
$usuario = 'root'; | |
$senha = ''; | |
$banco = 'mydb'; | |
$mysqli = new mysqli($servidor, $usuario, $senha, $banco); | |
// Deletando dados | |
$sql = "DELETE FROM dados WHERE id=2"; | |
$query = $mysqli->query($sql); | |
echo 'Registros afetados: ' . $query->affected_rows; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment