Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $database = "nome_do_seu_banco";
- $username = "root";
- $password = "";
- try {
- $con = new PDO("oci:dbname={$database}", $username, $password);
- }
- catch(PDOException $exception){
- echo "Connection error: " . $exception->getMessage();
- }
- $job = isset( $_GET['job'] ) ? $_GET['job'] : null;
- $id = isset( $_GET['id'] ) && is_numeric( $_GET['id'] ) ? $_GET['id'] : null;
- $sql = $con->prepare("SELECT CO21CODCOT FROM CO21T1 WHERE CO21CODCOT ='{$id}'");
- $sql->execute();
- if( $sql->rowCount() >= 1 ){
- while( $rows->$sql->fetch( PDO::FETCH_ASSOC ) )
- {
- //....
- }
- }else{
- // O que deseja fazer se não encontrar
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement