Most voted "prepared-statement" questions
19 questions
Sort by count of
-
20
votes3
answers14671
viewsWhat is the difference between Statement and Preparedstatement?
When I paid for the database chair, we worked with the bank alone, with no connection to an application that interacted externally with the DBMS. Only then was presented the JDBC(Java Database…
-
17
votes2
answers3105
viewsWhat is the question mark in a query?
Use ? in a query really avoids the SQL Injection? Avoids 100%? I saw this code and I heard many people talking about it, saying it helps in this case and how to use it? Could someone give a better…
-
8
votes1
answer299
viewsPrepared statements with Mysqli does not require validation of data entry?
I was studying here about security in PHP & Mysqli, and I was left with a question: if I am using prepared statments, still need to validate data entry? For example, I have a field in the form:…
-
7
votes2
answers837
viewsHow to implement a class to use Preparedstatement through it?
I have the following class Connect.java package util; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; import…
-
3
votes3
answers56
viewsUse prepare statement at a constant value?
$type = 'post'; $stmtPG = $conn->prepare("SELECT count(*) FROM myTable WHERE entry_type = :type"); $stmtPG->bindParam(':type', $type); $stmtPG->execute(); $total =…
-
3
votes1
answer75
viewsHow to load changes made in native java classes?
Hello, I am trying to run a jar file, replacing some original java interfaces for database connection, changing the setBoolean method to receive an object as parameter. Original: void setBoolean(int…
-
1
votes1
answer53
viewsHow do I resolve the prepare error for this script?
I’ve been looking for a solution for 2 hours [this problem][1]. I am starting a course of Virtual store with PHP and the mistake is this: he says I’m trying to give a prepare in an unincorporated…
-
1
votes1
answer37
viewsHow to pass information in bindvalue with two or more information stored in the variable?
I’m having a problem... I’m getting some id from the database and storing in $ids_cozinha. gave a var_dump and a print_r, is returning me the id I want, so far so good. <pre> <?php…
-
1
votes1
answer363
viewsSELECT INNER JOIN using PHP foreach in Datatable
I’m working on a CRUD using Datatable where it shows me data from 3 related tables where these three tables two are related to one. In case the PHP code is executed to fetch and display the data in…
-
0
votes1
answer61
viewsMysqli prepared sentences
Hello, I have a problem, I would like to know about prepared sentences, I have this code: $query_email = ("SELECT email FROM usuarios_ WHERE email = ?"); $stmt = mysqli_stmt_init($conn); if…
-
0
votes0
answers46
viewsPdostatement::execute(): SQLSTATE[HY093]: Invalid Parameter number: Parameter was not defined
I have a problem making an Insert in the base using PDO. PHP shows me this error. Searching, I saw that this error refers to the number of parameters that do not hit bindValues, for example: INSERT…
-
0
votes1
answer179
viewsWhat does PDO Prepare do when we use it?
What exactly prepares it does? For example, does it encrypt, or something like that? Because, to be honest, I use the method, but I never really understood its use. <html>…
-
0
votes1
answer41
viewsHow to insert a keyword into a database search already performed
For example, I did a search of all user data in the database to echo in different columns by the site: $stmt = $conexao->prepare("SELECT * FROM esc_usuarios WHERE usu_codigo = ?");…
-
0
votes1
answer522
viewsProblem using parameter in Preparedstatement
I wonder if there is any problem in using the variable "parameter" after "AND", because when I tested putting the column name directly in SQL it worked and when I try to pass the column name with…
-
0
votes0
answers30
viewsUpdate status without creating widget directly - Flutter
I have in my main.Art a Bottomnavigationbar that should always be visible. Some screens cannot be accessed by Bottomnavigationbar icons. Main.Dart vvvvv void main() async { await _storage.ready;…
-
0
votes0
answers114
viewsError Parameter index out of range (1> number of Parameters which is 0)
I’m studying JDBC and learning how the resultset and statement, did first the method of adding and changing data with the statement that worked perfectly private void…
-
-1
votes1
answer326
viewsHelp with PDO (PREPARE)
Hello. I am trying to make a CRUD using PHP OO. But when I run, I have an error in the preparation of the PDO class. I have only the bank registration code and the bank connection code for now:…
-
-1
votes0
answers11
viewsPutting Prepare Inside or Outside the Loop? PDO + PHP
I use "prepare" PDO for everything, so optimizing my application I saw that I may be doing something "wrong" at the time and I didn’t even think it was the following: I have a "Database" class that…
-
-2
votes1
answer86
viewsHelp with Mysql connection
I’m creating a CRUD system for practices, and my code is making a mistake in mine prepare(). Index.php <?php require_once 'core/init.php'; // Abre a conexao com o banco de dados $pdo =…