Questions tagged as 'pdo'

2
answers

Error inserting records with PDO in php

Well I have the following error, that when I try to register data in the database I get the following error    Error: SQLSTATE [42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresp...
asked by 08.04.2018 / 06:19
2
answers

Error in login form in PDO

I have this PHP to validate my username and password. The file answers me with "Ralizada Connection" and stays there. Can you tell me what I'm doing wrong? I use encrypted passwords. <?php try{ $conn = new PDO('mysql:host=.....
asked by 16.08.2018 / 16:15
1
answer

Error inserting into mysql DB with PHP PDO

I'm doing an insert with PHP PDO to a mysql database, I pass an array for the parameters, but it works and I get the following error SQLSTATE [HY093]: Invalid parameter number: parameter was not defined this is the connection method publi...
asked by 10.09.2018 / 00:03
1
answer

How to correctly reference charset = utf8

I have my coding in my php code in the PDO connection, it works correctly, but when you insert the data into MySQL, you can see it; (Ñ) Send them in lowercase CASTAñEDA example, in my form in most of the fields, I have what is $ strtoupper but I...
asked by 28.08.2018 / 19:47
1
answer

How to travel with PDO

I'm trying to login and I'm using PDO. This is my code Form <form method="POST" action="ajax.php?mode=login" class="form-signin"> <h1 class="h3 mb-3 font-weight-normal">Iniciar Sesión</h1> <label...
asked by 07.07.2018 / 16:16
1
answer

Form in PHP to update MySQL Update PDO - exec?

I have to use this code, I do not have another option, I do not find how to make the assignment in the UPDATE receiving the input data $id = $_POST["id"]; $nombre = $_POST["nombre"]; $categoria = $_POST["categoria"]; $precio = $_POST["precio...
asked by 12.06.2018 / 05:14
1
answer

Problems when trying to update with pdo

Trying to edit a 'Course' generates this error, SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens My form: <form action="vista%20normal.php?pagina=administrar_cursos" method="POST" enc...
asked by 12.04.2018 / 10:57
1
answer

[HY093]: Invalid parameter number: parameter was not defined [closed]

In my opinion everything goes Ok, but when it makes the sentence it gives me the following error:    Fatal error: Uncaught exception 'PDOException' with message   'SQLSTATE [HY093]: Invalid parameter number: parameter was not defined'   in   ...
asked by 23.03.2018 / 13:12
1
answer

Problem with bindParam: "ORA-01745: invalid host / bind variable name"

I am trying to insert a user and his password into my Oracle database. When I insert a basic name and password, all right. But when I try to insert a user, with a password hasheada, I do not get an error, but it does not do anything to me either...
asked by 13.02.2018 / 11:08
1
answer

Query get Records between an initial and a final hour

I am trying to make a query to validate if a specific appointment already exists, since in the same period of time no other appointment should be generated. For this I consult the date of the appointment, the initial hour of the appointment and...
asked by 16.03.2018 / 04:21