Questions tagged as 'mysql'

1
answer

Store a subquery in a variable

I am trying to store a subquery in a variable and then enter it in another query. The code I have is this: $anu = "(SELECT DISTINCT Prod_Anun FROM productos where Prod_Anun = 'Particular')"; $consulta="SELECT * FROM productos...
asked by 23.03.2017 / 20:21
1
answer

Pip install Mysql for Pynthon in windows 10 64 bits gives me SKD error 7.1

On a 64-bit Windows 10 Notebook, with Python 3.3 installed. When I want to install Mysql through Pip in Python I get the following error:    error: Microsoft Visual C ++ 10.0 is required. Get it with "Microsoft Windows SDK 7.1": www.microsoft...
asked by 04.12.2016 / 15:54
1
answer

How to close the connection correctly with MySQL in Java when reading from the database to fill a JTable

I request in my program a phone number of origin, another destination and the duration. I keep it in the database, then I must read the database to fill a JTable but, you are giving me the following error:    mysql.jdbc.exceptions.jdbc4.MySQL...
asked by 26.11.2016 / 03:21
1
answer

Validate form with PHP

I already have my form and my validations done, what I really want is that when you enter information in the (input) text boxes of the form and when you leave a text box ( input) empty or incorrectly validated, do not delete the fields that...
asked by 27.11.2016 / 02:04
1
answer

MariaDB does not recognize a field name in a table when using load data infile

I have a small problem with MariaDB: I have a table with several columns, one of which is called fecha_hora . When trying to insert data with load data infile , MariaDB tells me that it does not recognize this column. I deleted an...
asked by 25.11.2016 / 22:44
2
answers

How to do AUTO_INCREMENT on a composite key that only affects a key?

I have a 'Group' table that handles the groups that are open for subjects. The key to this table is the group number + subject code If I have: Materia No_Grupo TC2016 1 TC2016 2 TC2016 3 The AUTO_INCREMENT works fine but I want that when...
asked by 27.11.2016 / 09:32
1
answer

Protect a php file that shows json

I have my PHP file: <?php mysql_connect('hostejemplo.com','usuario','contraseña') or die('no se puede conectar'); mysql_select_db('basededatos'); $sql="SELECT * FROM tabla"; $resultado=mysql_query($sql); while($row = mysql_fetch_assoc($res...
asked by 20.12.2016 / 18:56
3
answers

Join table fields with different ID

I have this table in MySQL: +-------------------------------+ | *UDH* | *Text* | -------------------------------- | 050003B90301 | Hola soy A | -------------------------------- | 050003B90302 | rmin y...
asked by 21.12.2016 / 14:45
5
answers

Get a lot of records from my MySQL DB using PHP

Warm regards. You see, I have a table "movements" with approximately 300 thousand records, which I wish to obtain through PHP, but at the time of making my query, I do not get results, unless I put a LIMIT. This is my code: $query = "SELECT...
asked by 12.12.2016 / 17:00
3
answers

Sentences prepared in PHP

I have a query in SQL , but I do not know how to do it or pass it in routine PHP , since I must make that report. In MySQL it works perfect, but how to do a routine in PHP for this query : SET @sql = NULL ; S...
asked by 17.11.2016 / 16:32