Questions tagged as 'mysql'

1
answer

Delete a records and records related to this, MySql

know how I can delete a record and at the same time all records related to this, I currently have the table tb_artista in which I want to delete a record of that table with the id AR1, at the same time in tb_album I want to delete a table with i...
asked by 04.12.2018 / 15:02
3
answers

Default value to an input in HTML

I have a form that will register your name, surnames, etc. and I have a field that asks for a number, I already register well, now I would like it if the number field is empty that I insert something by default, example: 0. In the form I get...
asked by 11.04.2016 / 18:44
1
answer

How to show the data of a logged in user

Good, some way to show the data of a logged in user? I need that after a user logs in, in another page show me the data of this user: I have two tables: And this is my code with which I am validating and trying to extract the user...
asked by 26.06.2016 / 10:27
1
answer

How to subtract the total of repetitions between two tables?

Good morning, I have this query that brings me the total of the times that the user repeats the previous month of the "megusta" table, in order to get the total per user of how many I like to have obtained the previous month. SELECT usuario...
asked by 19.12.2018 / 21:05
3
answers

Validate if there is a record in the database

I am trying to validate if there is a record in the mysql database by means of an alert with php but it does not generate that alert if (isset($_POST['numExp']) && !empty($_POST['numExp'])) { $consulta=$PDO->prepare("SELECT *...
asked by 24.06.2016 / 21:51
1
answer

MYSQL No suitable driver found

I currently use Intellij, it turns out that I'm trying to connect to a MySQL database, but after adding the library and using a class connection (which works perfectly with the MariaDB driver) I find the error in the title of the question publ...
asked by 10.11.2018 / 13:40
1
answer

Obtain error data in a query in mysql with the condition that it only shows the errors that cover 80% of the total errors

I have the following doubt, although I already did it by taking the data and processing it with php I wanted to know if I can already bring the information from the base as follows: Based on this query I get a list of errors with their respec...
asked by 14.11.2018 / 18:58
1
answer

How to perform a query on mysql using count?

I can not perform the query that returns me the number of municipalities of the reports, example: |municipio | cantidad | |----------|----------| |ACAJETE | 4 | |PANTEPEC | 5 | |PUEBLA | 1 | In the report table: t...
asked by 07.11.2018 / 00:56
2
answers

Select Mysql for Kardex Balance

Dear Colleagues. A query is required in the following way. My question is how I would have to perform the select to generate the balance field. Thanks for your help. Greetings     
asked by 07.06.2016 / 18:13
3
answers

I can not save the data in a mysql database

I'm trying to save data from a form made in php the codes are as follows. Registration form <html> <head> <title> Formulario de registro </title> </head> <body> <h1> Formulario de registro...
asked by 05.06.2016 / 03:52