Questions tagged as 'pdo'

2
answers

Validate registered user

I am trying with Ajax to show if the user exists in the database so as not to have two registered users with the same name. What I do is through the event change of jQuery show with a span if the user exists or not in...
asked by 27.03.2018 / 20:56
0
answers

enable PDO module mysql and php in godaddy

I have a windows classic hosting with iis and php 5.3 in godaddy there my website connects to a mysql database this is my connection <?php $dsn = 'mysql:host=dbgts.db.2365702.3ed.hostedresource.net;dbname=dbase'; $username = 'user'; $pa...
asked by 14.09.2017 / 17:55
3
answers

Create PDO query with the values of an array

I am trying to generate a MySQL query with the data I have captured in a array . array(2) { ["area1"] => array(3) { [0] => string(5) "item1" [1] => string(5) "item2" [2] => string(5) "item...
asked by 04.04.2017 / 18:27
3
answers

Error inserting a datetime with PDO

I am changing the entire system from Mysqli to PDO and I am having a problem when trying to insert a date in a field of a record. The record that I try to record is news, which involves a date. The format of the date that I bring w...
asked by 27.07.2017 / 02:14
2
answers

what is happening?

I am doing a CRUD and when I finish filling out the form it appears that the "patient has registered", that is what I should say if the records are sent correctly to the table. BUT when going to the table there is nothing (records do not appear)...
asked by 17.04.2018 / 08:32
4
answers

PHP mysql_fetch_array

I'm trying to show results from my database, I did not know how until I saw this way of doing while($row=mysql_fetch_array($result) { //Code } and then I saw that using this form is somewhat obsolete, so I would have to choose to use...
asked by 23.06.2017 / 23:13
3
answers

Error PDOStatement :: bindParam ()

In response to the advice you gave me in the question I asked a few days ago ( Update records using PDO ) I am changing the code to avoid SQL injection with PHP. The issue is that when I run the update page I get the following error:    PD...
asked by 29.12.2016 / 17:35
2
answers

Concatenate a PHP variable in a MYSQL query

I'm doing a query SQL in PHP using MVC . I'm doing a function which has a parameter and this is used in the query SQL . This is the code and up to this point it works for me. public function miFuncion($u){ $stm = $t...
asked by 04.01.2019 / 16:52
2
answers

Edit edit with PDO

**Este es el error que me tira no se si tengo bien hecho el codigo** Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE [HY093]: Invalid parameter number: parameter was not defined' in D: \ xampp \ htdocs \ frosted proje...
asked by 11.08.2018 / 03:36
1
answer

Query on PDO with error when doing echo

It turns out that I was testing some scripts considered "safe" to do SQL queries, I was interested, but I can not understand where the error is. It turns out that this script includes the fetch, and all that, so that it directly does% $consul...
asked by 29.05.2018 / 01:53