Questions tagged as 'mysql'

1
answer

How do I take while from this example and display only 1 die?

How do I take while from this example and display only 1 data? $query = $mysql->query("SELECT * FROM dados WHERE id='$id'"); while($row = $query->fetch_array()){ echo $row['nome']; }     
asked by 18.04.2018 / 20:06
1
answer

Insert XML into MySQL table [closed]

I have an xml with the name of some movies, I want it when I press a button in html the names are inserted into a table in the database. I made the connection to php using ajax. The problem is that when I do the insertion, the first title is ski...
asked by 15.04.2018 / 19:43
1
answer

Replace Mysql with substring

I have information saved in a mysql field with the following format: STRING STRING STRING XXX Separating these strings there are 4 spaces. I would like to remove everything that is after these 4 spaces, but I did not get a way to do the...
asked by 16.04.2018 / 21:10
1
answer

Compare values using SQL

I find myself in the following picture situation I need via sql to compare the value of the property with the minimum and maximum filter value but due to the semicolons I do not get results. How can I fix this?     
asked by 13.04.2018 / 16:23
1
answer

Combobox brings only one result of the Mysql table (NodeJS + JavaScript)

I am able to bring in only a value in the combobox that is in the table of mysql, I need to be listed both items in the same combobox. It is appearing one in a combobox and the other just below. <div class="container"> <% if(busca...
asked by 29.04.2018 / 19:32
1
answer

Arrange mysql select by groups of the month

I'm trying to organize a return of my mysql database in months, that is, so that I have groups of the months of donations that the site that I work receives, I tried: SELECT * , MONTH( 'DataConfirmacao' ) FROM 'doacoes' WHERE Pendente = '1'...
asked by 05.05.2018 / 18:21
1
answer

Select php and bank connection- Beginner [closed]

I'm having a big problem .. I'm a beginner with Php, I've researched a lot but I can not go on. You're giving this error   Uncaught Error: Call to a member function mysqli_fetch_array () on boolean in C: \ xampp \ htdocs \ test.php **...
asked by 04.05.2018 / 20:55
1
answer

Mean (avg) conditional MySQL

I have the following table userid--state-----fraction 589-----wrong---0,0 589-----wright---1,0 589-----wright---1,0 589-----wrong---0,0 589-----wrong---0,0 589-----wrong---0,0 589-----wrong---0,0 589-----wrong---0,0 589-----w...
asked by 05.04.2018 / 19:38
2
answers

How to bring SQL result grouped by year and within months

I have a table like this: data |id 2017-02-01 00:00:00|1 2017-02-01 00:00:00|5 2017-04-01 00:00:00|2 2018-02-01 00:00:00|3 2018-04-01 00:00:00|4 Then I make a query with PHP in Mysql that brings me SELECT id, data FROM order...
asked by 05.04.2018 / 20:55
1
answer

Show only those that are not common between two querys in mysql

I have this first query that only shows names with the registration date of the current day: SELECT nome, centrodb.registoMiDe.Quarto, DataRegisto, Miccao, Tipo1, Dejeccao, Tipo FROM centrodb.utentes...
asked by 12.04.2018 / 15:56