Questions tagged as 'mysql'

1
answer

Select per group

Good morning guys, I'd like to know how to do the following SELECT in mysql: Having the following table, I need to select the last 3 purchase of each Name: From now on, thanks     
asked by 03.04.2017 / 14:45
1
answer

Telephone Directory Search

I have a search problem with phrases, I have a search field and I am using the LIKE operator to do this, but it is not serving me correctly, I have tried to use SOUNDEX now, but it only returns one word with the same phonetic than the other word...
asked by 09.01.2015 / 17:53
2
answers

Query in two tables at the same time

I have, for example, the following scenario:                           Table                                Column01                                Column02                                Column03              Home                        ...
asked by 18.02.2016 / 23:09
1
answer

How to create a simulator using SESSION

Hello, I'm trying to create a simulator using SESSION, but since I'm a beginner and a lot of lay people, I'm asking the help of friends. Next I created the page where the user can change the logo, it simply selects the image and changes it with...
asked by 08.02.2016 / 20:49
1
answer

Efficiency of PHP Query Execution PHP

Is there any performance difference in the codes below? $result = $pdo->query($sql); foreach($result as $reg){ ... } and ... foreach($pdo->query($sql) as $reg){ ... } I did some testing, but the behavior of the runs does not seem...
asked by 29.01.2016 / 18:40
1
answer

Monetary values with asp.net MVC

I am having difficulty working with monetary values (decimals), using web application, asp.net MVC , with database Mysql . The problem is that I can not edit decimal values, such as: 53.50 , or 53.50 . I can not save using dot, not comm...
asked by 09.05.2015 / 05:33
1
answer

Doubt regarding float field query (ruby on rails with mysql)

Hello, I have a question regarding a database with rails. If I declare a field is "float", when I do the query, do I need to use ".to_float" for the rails to understand the type of this field? For example, in this calculation: def se...
asked by 06.10.2016 / 14:36
1
answer

Select that compare sets of column values from two tables

Sirs, First, I have 2 tables Table 1: ID L1 L2 L3 L4 L5 ------------------------------------ 1 a c e g i 2 a c d g i 3 l n p r t Table 2: ID L...
asked by 27.09.2016 / 21:50
2
answers

Sort by day of the week, starting with today

I want to sort the results by the days of the week I have 7 events, 1 event for each day, and you have to sort it as follows:   Sunday, Monday, Tuesday, Wednesday , Thursday, Friday, Saturday Assuming that today is Wednesday it will ha...
asked by 15.02.2015 / 02:28
1
answer

Dynamic Search with JSON - PHP - MYSQL

I've been searching the internet but I could not find any references, perhaps because I was searching wrong, so I resorted to creating this post. I have a query in the database (MySql with PHP) that returns me a list of products with several...
asked by 08.12.2014 / 20:43