Questions tagged as 'prepared-statement'

3
answers

What is the difference between the Statement and the PreparedStatement?

When I paid for the database chair, we only worked with the database, alone with no connection to an application that interacted externally with the DBMS. Only then was Java Database Connectivity (JDBC) introduced. But due to the rush of the cou...
asked by 21.11.2015 / 17:36
2
answers

What is the question mark in a query?

Does%% use of a query really prevent SQL injection ? Avoid 100%? I saw this code and I heard lots of people talking about it, saying it helps in this case and how to use it? Could someone give a better example? $query = "SELECT * FROM tabel...
asked by 26.06.2014 / 23:18
1
answer

Prepared statements with MySQLi waits data entry validation?

I was studying here about security in PHP & MySQL, and I had a question: If I'm using prepared statments , is it still necessary to validate data entry? For example, I have a field in the form: <input type='text' name='campo'>...
asked by 24.09.2015 / 09:11
3
answers

Use prepare statement in a constant value?

$type = 'post'; $stmtPG = $conn->prepare("SELECT count(*) FROM myTable WHERE entry_type = :type"); $stmtPG->bindParam(':type', $type); $stmtPG->execute(); $total = $stmtPG->fetchColumn(); $total_paginas = ceil($total/$maximo); Ther...
asked by 24.09.2018 / 17:24
2
answers

How to implement a class to use PreparedStatement through it?

I have the following class Connects.java package util; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Statement; public class Conecta { //Pode...
asked by 20.03.2017 / 02:03
1
answer

How to load changes made to native java classes?

Hello , I'm trying to run a jar file, replacing some of the original java interfaces for connecting to the database, changing the setBoolean method to receive an object as a parameter. Original : void setBoolean(int parameterIndex, boo...
asked by 05.07.2017 / 22:56
1
answer

How to solve the prepare error of this script? [closed]

I am 2 hours looking for a solution to this problem ] [1]. I'm starting a Virtual store with PHP course and the error is as follows: it says I'm trying to give prepare strong> to an object not instantiated. The logic is this: he made t...
asked by 20.12.2015 / 01:15
1
answer

What does the RFP Prepare do when we use it?

What exactly does it prepare you for? For example, does it encrypt, or something like that? Because, frankly, I use the method, but I never quite understood its use. <html> <head></head> <body> <?php...
asked by 21.07.2018 / 04:19
1
answer

Mysqli prepared sentences

Hello, I have a problem, I would like to know about prepared statements, I have this code: $query_email = ("SELECT email FROM usuarios_ WHERE email = ?"); $stmt = mysqli_stmt_init($conn); if (mysqli_stmt_prepare($stmt, $query_email)) {...
asked by 18.02.2016 / 01:47
0
answers

How do I pass information in the bindvalue with two or more information stored in the variable?

I'm having a problem ... I'm getting some id in the database and storing it in $ids_cozinha . I gave var_dump and print_r , I'm returning the ids I want, so far so good. <pre> <?php print_r(implode(", ",$ids_cozinha...
asked by 22.11.2018 / 18:45