Questions tagged as 'mysql'

1
answer

Where hair select

How do I get data referenced by select 'result' return only those that contain the value '1' SELECT DATE(m.data_marcacao) AS data, nome_operacao operacao, f.cracha_funcionario, MAX(IF(id_tipo_marcacao_est = 4,...
asked by 22.04.2015 / 22:32
2
answers

Find MySQL record by specific character

I have a database named completo , whose dados table is: id cpf nome 1 38831370570 joao da silva 2 27283620508 maria joaquina 3 94470661945 carlos eduardo I would like to 'filt...
asked by 21.06.2017 / 00:49
1
answer

Another form of UPDATE?

I am doing a Mysql class work and I would like to know another way of UPDATE because it is not changing.    Update the price of the service of all the animals that received bath in the pet shop and had value less than 15 reais. UPDATE 'au...
asked by 09.07.2017 / 04:44
1
answer

Difficulty building an SQL statement

I have broken my mind here to build a SQL, maybe someone can help me. I'm trying to write a report to collect the relationship of notes that were eventually deleted. The user registers an nf in the system that has the initial status "relat...
asked by 01.09.2017 / 04:00
1
answer

CodeIgniter form_open_multipart, how to use

I'm using CodeIgniter in a project but I'm having a hard time sending information, I have a view that contains a form with the registration fields:                              <?php echo form_open_multipart('Contro...
asked by 26.11.2018 / 12:51
3
answers

Format real (br) value for decimal (10,2) of mysql

Good afternoon, guys! How to format Real (br) value for numeric (10,2) of mysql using php number_format? I tried to use: $num="89,90"; ou $num="1.089,90"; number_format($num, 2, '.', ''); But it's zeroing the cents.     
asked by 13.12.2018 / 20:39
3
answers

Order of posts when I consult the database of my CMS

I'm developing a Site with CMS. It works perfectly just that you would like the last posts to be at the top of the page. What is happening now is that the last posts go to the bottom of the page just wanted the order to be opposite. PHP Class...
asked by 06.03.2014 / 16:48
3
answers

Query to search for value in the Database

I want to display the results obtained in a form but when saving to DB I did not save as null but saved like this: Date: 0000-00-00 E Number: 0 Query looks like this: $sql = mysql_query ("Select *, Count(*) from tabe...
asked by 07.02.2014 / 10:36
2
answers

php encoding to mysql database [duplicate]

Well, I'm having a problem with encode when posting data to a table mysql by php , my page is with encode utf-8 , my bank using latin1 , but I do not know how such a conversion, if I change the encode of the site...
asked by 14.12.2016 / 02:50
3
answers

How to go through each row in the database compare and update a specific column?

I have a table named PRODUCT and I need to make a comparison between two columns, the column DATA_INICIAL AND DATA_FINAL , for each line covered, if the product does not agree enter the value 0 in the PROD_ATIVO column. Rule: If...
asked by 27.03.2017 / 20:53