Questions tagged as 'prepared-statements'

1
answer

Doubts about an update using prepared statements

$username=$_POST["username"]; $email=$_POST["email"]; $sex=$_POST["sex"]; $description=$_POST["description"]; $infoVisivility=$_POST["infoVisivility"]; The thing is that I collect the above data from a form for the user to...
asked by 28.08.2018 / 05:18
3
answers

Combine prepared transactions and queries

I am studying the subject of transactions and queries prepared in PHP. Testing I have created a code to combine transactions with prepared queries. It would be something like that (imagine that the connection is already established by PDO): tr...
asked by 01.02.2018 / 01:48
1
answer

Error inserting records with MySQLi with prepared statements

I published a question yesterday, but another very similar problem arose, I already verified the connection to my database (it is correct), I already did "SELECT" of all my table and answered correctly, and update records and if you update them...
asked by 02.08.2018 / 02:06
0
answers

I need to change the date to string format in a PreparedStatemen to insert it in a database

Annex my code, the parameter 3 being "txtFecha" is the one that I can not transform: private void guardar() { try { PreparedStatement StmGuardar; String SQL= "insert into comics(idComics, Titulo, Fecha, A...
asked by 29.11.2018 / 03:29
1
answer

The PreparedStatement gets stuck when I ask a lot of questions

I have a method that has to be constantly sending requests to the server where the database is hosted, the place where I try to connect to the internet via satellite dish. The function of the program is to send a number also keeping date and...
asked by 16.06.2017 / 13:21
1
answer

I can not add a record to my database, mark error PreparedStatement [duplicated]

I am trying to add data to a database using a button, but at the moment of entering the data I get an error in the Prepared Statement part and my SQL statement I tried it on my local server (phpmyadmin) and it worked perfection, and I have not...
asked by 22.10.2017 / 08:40
1
answer

Doubts in PHP and SQL Ready Queries, SELECT Statement and Show Data

I try to update some systems that I have created, in which I try to add consultas preparadas to improve mainly the security. I'm trying to do a SELECT and it's not clear to me how I could go through it. $sql = "SELECT * FROM c...
asked by 08.09.2018 / 15:46
2
answers

Error sending data with prepare and mysqli

I am trying to send information to my database after making two queries, the first if the user already exists and the second if the email already exists subsequently made the "upload of information" to my database with my sentence prepared This...
asked by 03.04.2018 / 04:12
1
answer

Error in php Commands out of sync; you can not run this command now

I have already read a few articles, but I can not fix this error that I have. It is the first time I see this error, and I do not know how to solve it. Then using PHP and MYSQL to extract data from the database (use redundancy) and display them...
asked by 04.12.2017 / 05:06
1
answer

You doubt with a PreparedStatement that executes an UPDATE

I have this PreparedStatement , I would like to know if it is correct, I would also like to know if you have to create a method to do EXECUTE , or in the same method of PreparedStatement of UPDATE . public void Modify(...
asked by 15.08.2017 / 22:33