This file contains 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 | |
include '../../utils/bd.php'; | |
$stmt = $conn->prepare("UPDATE cliente SET nome = :nome, email = :email, cnpj = :cnpj | |
WHERE idcliente = :id"); | |
$stmt->bindParam(':id', $_POST['id']); | |
$stmt->bindParam(':nome', $_POST['nome']); | |
$stmt->bindParam(':email', $_POST['email']); | |
$stmt->bindParam(':cnpj', $_POST['cnpj']); |
This file contains 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 | |
include '../../utils/bd.php'; | |
$stmt = $conn->prepare("SELECT * FROM cliente"); | |
$stmt->execute(); | |
?> | |
// corpo da pagina... |
This file contains 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 | |
include '../../utils/bd.php'; | |
$id = $_GET['id']; | |
$stmt = $conn->prepare("DELETE FROM cliente WHERE idcliente = $id"); | |
$stmt->execute(); | |
header("Location: ../../pages/cliente/listar.php"); | |
?> |
This file contains 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 | |
session_start(); | |
include '../../utils/bd.php'; | |
include '../../utils/valida_login.php'; | |
$stmt = $conn->prepare("SELECT * FROM cliente | |
WHERE idcliente = :id "); | |
$stmt->bindParam(':id', $_REQUEST['id']); | |
$stmt->execute(); |
This file contains 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 | |
include 'conexao.php'; | |
$stmt = $conn->prepare("INSERT INTO cliente(nome, email, cnpj) values(:nome, :email, :cnpj)"); | |
$stmt->bindParam(':nome', $_POST['nome']); | |
$stmt->bindParam(':email', $_POST['email']); | |
$stmt->bindParam(':cnpj', $_POST['cnpj']); | |
try |
This file contains 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 | |
date_default_timezone_set('America/Belem'); | |
$dbname = ''; | |
$user = ''; | |
$pass = ''; | |
try { | |
$conn = new PDO( 'mysql:host=' . 'localhost' . ';dbname=' . $dbname, $user, $pass, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'")); |
This file contains 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
package br.exemplosqlite; | |
import android.os.Bundle; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.view.Menu; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.EditText; | |
import android.widget.Toast; |
This file contains 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
package br.exemplosqlite; | |
import java.util.ArrayList; | |
import java.util.List; | |
import android.content.ContentValues; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.database.sqlite.SQLiteDatabase; |
This file contains 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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package javaapplication1; | |
import java.sql.Connection; | |
import java.sql.PreparedStatement; | |
import java.sql.ResultSet; |
This file contains 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
CREATE TABLE usuarios ( | |
id serial, | |
nome varchar, | |
login varchar, | |
senha varchar, | |
PRIMARY KEY(id) | |
); |
NewerOlder