Questions tagged as 'pdo'

0
answers

Drop down does not show data

I have the solution. I only had to change some connections if (isset($_REQUEST['action'])) { switch ($_REQUEST['action']) { case 'actualizar': // Recupero el id del campo hidden $alm->__SET('acro_documento', $_REQ...
asked by 18.04.2017 / 12:14
1
answer

I have an error in a mysql query using php PDO

I'm starting PDO and I need to make a query, but I do not do it, I do not know if the problem is with the variables I use in the query or I'm declaring something wrong in my code. This code is the one of my variables: foreach ($_POST['ciuda...
asked by 07.04.2017 / 20:43
1
answer

How do I get the data of several input that autocomplete to another

Good afternoon, I have this bbdd with 7 tables. link In the last one as we can see I have 4 PK because it is necessary to be able to have a document with the same name but with different versions. The problem is: How do I collect the dat...
asked by 05.04.2017 / 19:13
0
answers

Collect two variables to delete and edit

I keep returning error I put the 3 documents that I use. The problems come to me from the ones I have in the end, I think index.php      // Logica $alm = new Categoria(); $model = new CategoriaModel(); if (isset($_REQUEST['action'])) { swi...
asked by 04.04.2017 / 11:13
0
answers

Change primary key through a web interface made by PDO

I have created a database with 7 tables, including all of them related. In this web interface I need to modify all the records of the table including the field of the primary key, but I am never able to edit it and when I approach it it tells...
asked by 03.04.2017 / 11:03
1
answer

show the total sum and show it in variable

I am trying to make a leader classification table similar to the one on this website : But the only problem I have that does not show me the total sum of points well, I do not calculate the sum well. The rest is fine the only problem I...
asked by 15.04.2017 / 06:52
1
answer

Problems with lastInsertId ()

In a Windows Server 2008 installation, PostgreSQL database, I have the following piece of code in PHP: $this->con->beginTransaction(); try { $stmt = $this->con->prepare( 'INSERT INTO sedoc.proc_dest(id_categoria, ci)'...
asked by 28.03.2017 / 00:12
1
answer

PDO in two different INSERT?

Is it possible to make two prepared statements in two INSERT of different tables that I have in a record, that is, one prepared for each one? For example, I have this: INSERT INTO datos (nombre, email) VALUES('$nombre', '$email'); INSERT IN...
asked by 13.02.2017 / 17:43
1
answer

Show profile data by means of PDO session

Hello friends, I am currently trying to migrate this profile code from session to pdo but it gives me errors. The situation is the following if I start session and I want to modify my profile data but as I said, it shows me an error and I did...
asked by 13.02.2017 / 23:37
1
answer

How I send an array in PDO to use it in a smarty {html_options}

I am updating a section that uses mysql to PDO to deploy in a {html_options} of Smarty , and something that works well in mysql I do not know how to do it with PDO This is the original code that works well now: //Mando estados $q="SELE...
asked by 14.02.2017 / 20:05