Questions tagged as 'pdo'

0
answers

MYSQL / PHP / JQuery query assistant

I am working on a report that shows the results of an SQL query in an HTML table I can get the data very easy with PHP $link=new PDO('mysql:host=localhost;dbname=dbname','user','pass',array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));...
asked by 02.09.2018 / 19:56
1
answer

Excessive response time between MySQL and PHP

I am making an application which validates certain user data by checking if the provided data exists in the database, the responses of the database can take at least 3 seconds, but making the queries directly in the database , the answers are im...
asked by 13.10.2018 / 01:39
3
answers

How to select several records with Checkbox?

I'm doing a facturer, and when it came to billing several products, it occurred to me to use checkboxs since I still have not gotten with JS , so is the code of the checkboxs : <?php require_once ("ModeloProductos.php");...
asked by 29.03.2018 / 04:57
1
answer

Error when consulting with INNER JOIN

Everything works ok less when I pass the user id with the variable $ user_id. It just fails me with the inner join, giving me the following error,    Catchable fatal error: Object of class User could not be converted to string in Crud...
asked by 17.04.2018 / 13:29
2
answers

Problem in query mysql php pdo the data is repeated

Companions of StackOverFlow, I have the following question, I am trying to make a simple system of test or evaluation in php and create my database in the following way: +----------------+ | Tables_in_game | +----------------+ | answers...
asked by 24.04.2018 / 20:37
1
answer

What does #numero_anything mean at the end of stdClass in an object var_dump in PHP?

Having this query to the database, configuring to obtain an object: $data = [ 123 => 1000, 5 => 20000, 9 => 30000, ]; $id = 123; $news = $pdo->query('SELECT * FROM personas')->fetchAll(PDO::FETCH_OBJ); var_dump(...
asked by 27.07.2017 / 03:43
2
answers

Display data in a table with PDO

I HAVE PROBLEMS WHEN SHOWING THE DATA I DO NOT KNOW HOW TO DO IT WITH PDO ALREADY LOOK AT VARIOUS EXAMPLES BUT I DO NOT FIND ONE THAT SERVES ME <?php $conexion=new PDO("mysql:host=127.0.0.1;dbname=eladeria","root",""); $busqueda=$co...
asked by 02.08.2018 / 03:31
1
answer

Mysql forces me to fill in fields not null suddenly [mysql mode strict]

PHP PDO or MYSQL is forcing me, from one day to the next, to save fields not null of a table, before, if it was an integer, mysql automatically put a 0 . Let me explain. I have this table: clients id int auto incremental not...
asked by 25.04.2018 / 15:58
3
answers

How to display an image stored in BLOB format in a MySQL database in PHP

I have an image field that is a BLOB type in my MySQL database, I collect the data by PDO, but at the time of viewing it, it does not show me anything, I searched the Internet and everywhere I put the same thing with src="data:image/jpeg;base...
asked by 20.02.2017 / 12:06
2
answers

Why do the records in a Postgresql table keep blanks?

Quetal friends, I'm doing a practice with PHP + PDO and postgresql, and I've realized that when I save the data it leaves me blank. I attached an image and this is the code. <?php include_once "conexion.php"; try {...
asked by 30.06.2018 / 18:02