Questions tagged as 'pdo'

1
answer

Use PDO in PHP to connect to the SQL Sever database

I try to connect to the Microsoft SQL Server Managament Studio database with PDO but it tells me that an error occurred when connecting to the database. Here I attach the code: private $conn; function __construct() { } /** * Establi...
asked by 10.04.2018 / 17:52
2
answers

Php 7: Uncaught PDOException: SQLSTATE [3D000]: Invalid catalog name: 1046 No database selected in

I have been learning from Php in an online course that many may know, taught by Informational Pills. In this topic of connection to BBDDs with classes POO and PDO I have an error that took days without being able to resolve. This small toy...
asked by 29.03.2018 / 08:09
0
answers

SQLSTATE [22P02]: Invalid text representation

I am developing a CRUD using the PDO extension, I just need to debug the following error that appears in the MODIFY part, I made several tests and found that when I presented the user with the modified form the input The ID must be hidden becaus...
asked by 19.03.2018 / 02:54
2
answers

The driver could not be found

I am learning to use Laravel 5.6. I had AppServ installed with version of PHP 5.6 and for Laravel's requirements it is to have a version equal to or greater than 7.1.3, uninstall AppServ and download Xampp, which has the most current version...
asked by 07.03.2018 / 15:57
1
answer

Error with pdo connection

I'm trying to access the database using the pdo connection, I'm doing it using a Model class that contains the connection and a query that is inherited by the User class that is the one I'm calling. But it throws this error when using the method...
asked by 12.03.2018 / 04:23
0
answers

Lost data when saving in relational database

I've had this problem since I linked my database, at first I thought it was the error it was because all the data was not sent, but then try another DB without relating it and it turns out that if all the data are sent data and all the data coin...
asked by 03.03.2018 / 19:26
1
answer

Why does the $ stmt - execute () statement return false in php?

I am working with PDO in PHP I have a CRUD for the consultations, in the view I call the controller and in the controller I call the CRUD model to execute the sentence, I do not know why it is returning false, the code is the following : $stmt...
asked by 12.02.2018 / 09:55
1
answer

SQLSTATE [42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax

I am developing a API with slim framework 3 that connects to a base de datos local. The problem is the following when I try to update an element of my BD by passing it a id said procedure returns the following...
asked by 27.01.2018 / 20:09
0
answers

how to avoid duplicate email registration PHP 7 - MYSQL-PDO

First of all good day my dear ones, well I have a small problem when developing a registration system since I am using VMC with PHP7 , MYSQL .htaccess and PDO. The problem is that I can not avoid the duplicates of email...
asked by 29.01.2018 / 18:13
1
answer

Foreach travels PDOStatement object in some cases and in others not. Why is it?

I'm working on a PHP project with connection to MySQL , but I have a problem, when I do select , in some cases foreach can go through the PDOStatement object and in others do not, I do not know if I owe it to the cons...
asked by 20.12.2017 / 17:31