Questions tagged as 'mysql'

2
answers

Insert data with PHP to BD Mysql

I have started learning PHP relatively recently and in the process I am trying to insert the data of a form into a database using PHP as I have been looking at a safe way by means of ready statements and objects and so I am trying it even though...
asked by 29.09.2016 / 00:42
2
answers

How can I create a temporary row / row in MySQL

Hi, I'm trying to make a temporary row in mysql but I can not do it, if you can achieve how to create a column but I do not know how to make a row. Can somebody help me? This is the original column _________________ _______...
asked by 27.09.2016 / 20:17
1
answer

Problem with php: expecting ',' or ';' [closed]

PHP marks me an error when trying to login, this error marks me: Parse error: syntax error, unexpected 'private' (T_PRIVATE), expecting ',' or ';' in /opt/lampp/htdocs/webagropac/conexion.php on line 10 This is the code: <?php class...
asked by 17.09.2016 / 04:21
3
answers

Insert data with AJAX

What is the correct way to perform a data insertion with AJAX. I have seen several tutorials, but they are very different and somewhat confusing. Some use this code xmlhttp=new XMLHttpRequest(); and another no. Some declare variables for...
asked by 14.07.2016 / 22:00
4
answers

What is the correct way to close connections and statements?

I am developing my first application as a univ project. using MySQL with JAVA, I am realizing that there are methods and routines that do not close the connections and the statements although I give them their respective orders to do it, somethi...
asked by 29.07.2016 / 21:06
2
answers

Concatenate a PHP variable in a MYSQL query

I'm doing a query SQL in PHP using MVC . I'm doing a function which has a parameter and this is used in the query SQL . This is the code and up to this point it works for me. public function miFuncion($u){ $stm = $t...
asked by 04.01.2019 / 16:52
1
answer

how to consult 2 different results in the same column?

I am trying to make a query, where in the same column I have two different states, I explain them column = states state 1 state 2 my code for $auc = "SELECT * FROM resultados WHERE estados=1"; $au_count = $conexion->query($auc);...
asked by 27.06.2016 / 16:03
2
answers

Format MySQL date (d-m-Y) - (Y-m-d)

I am trying to format the date in MySQL but I do not get it, the format of the date is as follows: 08-05-2017 - 18:03 I want to transform it to 2018-11-09 - 20:30 Using SELECT DATE_FORMAT(STR_TO_DATE(fecha, '%d-%m-%Y - %H:%i'),...
asked by 10.11.2018 / 22:45
1
answer

Make UPDATE to a MYSQL data via PHP with a similar value from the same query

My query in this opportunity is to know if it is possible to make a UPDATE to a database from MySQL where the existing value in the database is only added a letter My query is as follows: $query = "UPDATE pedidos SET status_pedido = '...
asked by 13.11.2018 / 07:02
2
answers

how to show queries of 2 tables in a single table with MySQL?

I have these tables Student 1. Id 2. Nombre 3. Apellido 4. documento --es numerico 5. Id_escuela --numerico pero enlaza a Escuela School 1. Id_escuela ---enlace 2. Nombre_escuela Here my question, I want that in a si...
asked by 15.11.2018 / 21:54