Questions tagged as 'pdo'

1
answer

Insertion of data in PHP [closed]

Hello everyone, I have a question that is the following, I am not able to insert data in PHP, give pfv help :) :) Here is the code: This is my Connection.class.php <?php class Conexao { private $host = "localhost"; private $use...
asked by 11.04.2017 / 02:01
0
answers

PDO run () with connections not working

PHP Version: 5.6 Framework: PDO I have the following database query: $cIndus = array("ex1", "ex2"); $query = "SELECT 'nome_agr_corr' AS 'brita', CASE WHEN ? = 'usd' AND ? = 'externos' AND...
asked by 28.03.2017 / 18:53
0
answers

PDO class not found in namespace other than global

I am creating a class that uses PDO, but in a namespace other than global: namespace Classes\Config; use \PDO; class Connection { public static function getConnection() { $dbhost = "algumhost"; $dbuser = "algumuser";...
asked by 13.03.2017 / 19:52
1
answer

PHP Warning: imagecreatefromjpeg ()

   PHP Warning: Division by zero in /home/u215177984/public_html/classes/Painel.class.php on line 19   PHP Warning: imagecreatetruecolor (): Invalid image dimensions in /home/u215177984/public_html/classes/Painel.class.php on line 21 I do no...
asked by 14.03.2017 / 20:26
0
answers

does not return the mysql client names

CLASS class Cliente { private $db; private $id; private $nome; private $email; public function __construct(PDO $db) { $this->db=$db; } public function listar() { $query = "select * fro...
asked by 14.03.2017 / 15:37
1
answer

Error when inserting an image in Oracle using PHP PDO

I am making a system in PDO PHP which writes some images to the database, that same system was migrated from a MySQL database and was working perfectly, however at the time I'm going to record the image in a column of type...
asked by 02.03.2017 / 18:13
0
answers

How can I apply bank information in the modal?

Well, I'm working on my computer-based CBT and its purpose is to control student output. I was able to do registration, delete system, I am already working on the edition, however I would like to implement a button that when clicking, will show...
asked by 26.02.2017 / 16:23
0
answers

Call to a member function prepare () on a non-object in /var/www/estudos/estudentsCRUD/classes/cliente.php l on line 24

object try { $conexao = new PDO("mysql:host=localhost;dbname=estudos", "root", ""); }catch(PDOExeption $e) { die ("não foi possovem conectar " . $e->getCode() . ": " . $e->getMessage()); } $cliente = new Cliente($conexao);...
asked by 11.03.2017 / 19:39
0
answers

ID Error Category / SubCategory

Category Bank link Sub Category Bank link See, when I create the categories and include the subcategories in them, they are simply adding in all categories, I have reviewed the code several times and I do not understand. The IDs remain...
asked by 10.03.2017 / 19:25
0
answers

How to set time_zone using PDO

I have a connection using PDO that arrow SET NAMES UTF8 : $options = [ PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES UTF8" ]; But I would like to add SET time_zone='America/Sao_Paulo' .But of all the ways I tried it I return...
asked by 24.02.2017 / 20:44