Questions tagged as 'mysql'

5
answers

How to use str_replace in single quotation marks without removing the ones that are needed?

I'm fiddling with a database of a friend who has had some data entered wrong or a bit confusing or it's me that's making it difficult.    Ex: Mariana "Gurizinha's" This example was saved to the database as follows: \'Gurizinha\'s\'...
asked by 18.02.2014 / 17:24
3
answers

Problems with performance using UPDATE

I'm building an import application that takes the lines of a txt file and does the update in two tables, it works normally, but the files usually have more than 5 thousand lines, and I'm not able to do the update of all tables with my current me...
asked by 14.03.2014 / 17:12
2
answers

Convert Date dd / mm / yyyy to ISO 8601 Format (yyyy-mm-dd)

I have a field called maskedTextBox2 in the C # Windows Form, which contains a date mask in dd/mm/aaaa format. How can I do to convert this string into aaaa-mm-dd format to save to MySQL database, which uses dates in ISO 8...
asked by 30.03.2014 / 21:59
1
answer

Sort results with month and year

I have a table with the mes E ano fields. How can I sort results by month? I am already ordering by the year = > SELECT * FROM tabela WHERE id_cliente = '$id_cliente' ORDER BY ano DESC Now how can I order the months too...
asked by 11.07.2017 / 15:44
2
answers

Highlighted searched term in bold with or without accent

Hello friends, I would love your help. I'm trying to highlight the words typed in bold in search. the code below works only if you type "Brazilian selection" plus if you type "soccer selection" nothing happens. Thanks in advance for the help .....
asked by 04.08.2015 / 03:59
1
answer

How to secure a service site before launch?

I have no experience with this and am about to launch a service site and wonder if what I have to do to protect my idea is her patent, software registration or trademark registration? These are the options that appear in the National Institute o...
asked by 01.10.2015 / 05:26
3
answers

Adding result values in mysql

I'm servicing a bank and I'm having trouble making a select . Structure of table descontos_taxas : id | value | customer | data_created My Scenario: This table stores both fees and discounts in the same table. The rates are posit...
asked by 14.05.2014 / 22:40
1
answer

Scheduled Tasks in PHP

I have a database with information about books and loans from them, when the time that the book can be borrowed then the system should change the status of the loan record. I thought of doing this as a scheduled task, is there any way I can acco...
asked by 16.05.2017 / 20:36
2
answers

How to force a drop table in SQL?

When trying to give a drop table in a table that has relationships, the following error occurs: #1451 - Não pode apagar uma linha pai: uma restrição de chave estrangeira falhou    Is there any way to force deletion of the table...
asked by 18.05.2017 / 13:58
2
answers

IN () order in mysql

I'm doing the following select: select * from pedidos where id IN (1,3,4,2) Is there any way for mysql to return the result in the same order that it is in IN? With the select that I'm doing mysql is putting in ascending order and I do n...
asked by 08.05.2017 / 22:28