Questions tagged as 'pdo'

1
answer

Prepared inquiry and Array

I've done a CRUD of people with queries prepared in PDO that worked and now they have sent me to do it in a way that I do not understand, which is passing the values to use in array in execute() . For example, to crea...
asked by 13.01.2018 / 19:25
1
answer

How to read resource (2) of type (stream) with PDO_INFORMIX?

I have a problem with the return of the information I perform with PDO_INFORMIX , then I show you my case: 1. Database: INFORMIX 2. Schema: -Table: cartas -Campos: |id | codigo | titulo |cont...
asked by 27.12.2017 / 23:32
1
answer

Show gif loading php

I need to put a loading message while a sql statement is executed, since the specific statement will take a while to complete and I would like a gif or a simple message to be displayed. I attached my PHP code try{ include ('./pdo.php');...
asked by 15.10.2017 / 18:54
1
answer

How to prevent certain characters from being entered in a field

I'm with a form, where you have to enter a place of an event. It occurred to me to put in place of the word "Barrio" The characters "B °" and the recording process gave me an error. $lugar = htmlentities(addslashes($_POST['lugar'])); thus "...
asked by 29.08.2017 / 03:35
1
answer

modify value

greetings community, I would like to try to update the amount I have available with the new amount to enter, example if I have $ 5 left and would like to enter $ 10, it would be $ 15 now with the new available amount attached to my query and for...
asked by 15.08.2017 / 03:07
2
answers

Select rows corresponding to a userid

I am trying to create a query that only selects the data that has the respective userID of my database, but when I send the query the query brings me all the data, I am not very expert in database My query is the following: $query = "SELECT...
asked by 23.07.2017 / 01:11
1
answer

display color according to value in the database

hello friends I am showing the status of a query and I add a specific color but I notice it as very old, that kind of model and I would like to show it a little different the old model is the example with the blue color and how I would like to s...
asked by 21.06.2017 / 21:42
1
answer

Problem sending mail with PHP

I am trying to send a mail just after inserting records in the database. But it seems that the PDO has some conflict with the mail () statement, since the PDO works perfectly (without sending the mail) But when entering the line of...
asked by 22.06.2017 / 20:55
1
answer

PDO does not paint errors

Good afternoon, I am trying to tell PDO that when a SQL statement error is generated, the error code is generated, and currently I think it is due to the connection: public function __CONSTRUCT() { try { $this->pdo = new PDO('my...
asked by 11.05.2017 / 13:53
1
answer

Compare an Input with a record in a bbdd

We imagine that I have this form (It's much bigger but I want to try just one field): <form id="form1 " action="?action" method="POST"> <tr> <th style="text-align:left;">Acronimo</th> <td&...
asked by 14.05.2017 / 19:29