Questions tagged as 'mysql'

1
answer

MYSQL How to delete a row from a table with dependencies?

Is it possible to delete a row from a table with dependencies? I tried the command ALTER TABLE MinhaTabela NOCHECK CONSTRAINT ALL But the error appears    Error Code: 1064. You have an error in your SQL syntax; check the   manual that co...
asked by 13.06.2017 / 17:26
2
answers

How to format date php, to display 'Hojé as 00:00' and 'Yesterday as 00:00'?

I have a record in the TIMESTAMP database and wanted to display for example: If the date is current, show: 'Today at 00:00' If yesterday's date is in the database, view 'Yesterday at 00:00' And if it is more than 1 day ago, display the d...
asked by 08.06.2017 / 21:53
2
answers

Problem with SQL query

I'm trying to make a query but it returns the selected values in select and I can not because it returns all the values entered. Can anyone help me please? <form id="form1" name="form1" method="post" action="consultar_documento.php"&...
asked by 15.08.2017 / 11:26
2
answers

How to make a search filter

I have a query page that shows in tabular form the records registered in the database through a form. Given that it will reach a point that the system will have many registrations, I thought it wise to do a search field, but I'm not sure wher...
asked by 16.08.2017 / 16:57
1
answer

Group mysql data

Given two groups and processes tables. Where each group can have 0 or N processes. What is the best way to get this cross. Grupo -------- id Nome bol_ativo = S Processo ------- id numero ativo = S encaminhado = N What I would wish would b...
asked by 03.04.2017 / 05:34
1
answer

Query is returning an empty array (MySQL / Wordpress)

How do I get the values from the meta_value = candidate field of this table. I'musingthisquery,butit'sreturninganemptyarray.$resultados2=$wpdb->get_results("SELECT * FROM $wpdb->usermeta WHERE $wpdb->usermeta.meta_key...
asked by 10.02.2017 / 13:39
1
answer

How to do encrypted password queries in the database?

Well, I created a function called UserSearch that should encrypt the user's password and compare it to the database, but every time I run I get the error:    Warning: mysqli_fetch_assoc () expects parameter 1 to be mysqli_result, boolean gi...
asked by 23.07.2017 / 06:11
3
answers

Form data is not being registered

I have a form written in php with connection to a bank administered by phpMyAdmin. WHAT SHOULD HAPPEN: The data entered in the form should be registered with a alert "saved successfully" and returning to the previous page. WHA...
asked by 04.08.2017 / 14:37
2
answers

How to display only the completed data from a query to the bank

In my script, I do the query, however there are some fields that are empty and in foreach are empty spaces. How do I just get the data they have filled? <?php $consulta = $pdo->query("SELECT * FROM ws_so_wind WHERE ws_so_wind.id_...
asked by 12.04.2017 / 03:08
2
answers

Datapicker Mysql

How do I get the value that is in the datepicker and do a search in the database? I tried this way but this is not correct var cmd = new MySqlCommand("SELECT distinct id, Pedagio, Carro, Placa, Fabricante, Ano, Cor, Data FROM tcc WHERE Data =...
asked by 06.04.2017 / 14:33