Questions tagged as 'mysql'

2
answers

Warning: mysql_fetch_array () expects parameter 1 to be resource, boolean given in FILE on line 22

Why does it generate an error on line 22 if I compare it with other PHP and I have it right? On line 22 I have the following: while($rowHorEmp = mysql_fetch_array($resHorEmp)) And the variable $ resHorEmp comes from the following query:...
asked by 10.08.2017 / 23:42
2
answers

How can I sort this table mysql

I have the following table where I sort by prioridad and id_agenda , the order should be as follows Priority ASC and id_agenda DESC (In case a data does not have priority so it must go below the if it has priority). sql...
asked by 26.10.2018 / 14:33
3
answers

Warning message in PHP when not finding records

Good day, I have a page that searches for me in a table that I have in mysql, the question is .. If I do not find any record that I have to put code and where to get a notice like "No records found?" I enclose the code that performs the sea...
asked by 26.03.2018 / 20:00
2
answers

Highlight the first record brought from a Mysql query with DESC

I do not know if the title is descriptive enough, but I did not know how to ask the question. The problem is this: I have a query that I use to show a "top" of the 20 ages of some people. What I want is that the first record shown, in this ca...
asked by 29.04.2018 / 03:12
1
answer

how to send an email that has a html and php code message?

I need to send an email where the message is with HTML and PHP code, what does the code in html is to assemble the table and with the php and mysql must bring the data and put it in the table, when I only put html if it sends the msj, when I put...
asked by 18.04.2017 / 18:34
2
answers

How to convert a data of type string, to convert it into minutes? Using SQL Server and MySQL

I want to convert a data of type varchar to int, then I want to convert the result to minutes to get an average from there. This is the field: RalentiTiempoTotal 01:06:10 What I am doing first is separating the fields in this way: sel...
asked by 16.03.2017 / 19:15
4
answers

How to show records between two dates?

I need your help to formulate a query that allows me to show the months per year between two dates. I have a table called acquisitions where I keep the id_adquisicion and fecha_adquisicion Acquisition Table: TBL ADQUISICIÓN id...
asked by 03.03.2017 / 05:50
3
answers

LEFT OUTER JOIN query with 4 tables

I have 4 tables and Wallpapers, Downloads, Favorites, Votes that are defined as well. Of wallpapers I just need the id. Table Downloads +----+---------+---------+ | id | wall_id | user_id | +----+---------+---------+ | 1 | 1 |...
asked by 23.03.2017 / 01:45
1
answer

What is the best collation for my MySQL Database?

Greetings! I am working in a database which has planned to answer many queries, the case is that I want to know what would be the advantages of using utf8_spanish2_ci, utf16_spanish2_ci and utf32_spanish2_ci? They wanted me to explain thei...
asked by 10.04.2017 / 22:55
3
answers

How to get the number of times a word is repeated in MYSQL

How can I get the number of times the word "false" is repeated, in a column from mysql. example: id | read | ------------- 1 | false | ------------- 2 | true | ------------- 3 | false | ------------- 4 | false | -------------...
asked by 15.09.2018 / 21:11