Questions tagged as 'mysql'

1
answer

Error No value specified for parameter 4

When I run the code through the browser, the error mentioned in the title appears    "No value specified for parameter 4". Below I will leave my DAO and my MySQL configuration if someone can help me, if I need more information let me know...
asked by 14.09.2017 / 14:48
1
answer

Select command to delete duplicates, adding results [duplicate]

How do I change a table that looks like this: produto | quant a | 10 a | 5 b | 8 b | 3 And leave it like this: produto | quant a | 15 b | 11 Is there any comman...
asked by 16.08.2017 / 14:47
2
answers

Write to the bank who edited the profile

I am developing a system that registers employees of companies. In this system I have the employee and user tables. Employees table I have the data id|nome|empresa|data_cadastro|user_view|user_edit User table I have the data...
asked by 15.08.2017 / 21:04
1
answer

Delete delete button does not work

I have a query page that shows the entries made in the database through a form and a button with the option to delete. Query page: <h1 style=" text-align: center; height: 7; margin-top: 150; margin-bottom:70; "> Cons...
asked by 16.08.2017 / 14:11
1
answer

SQL - Delete records that have field with the same value as another, only when there is more than one record

I have a barcode table of products, I want to delete only the barcodes that are equal to the product code and have another code besides this. Table: CodProduto CodBarra 01 01 < não deletar 02 02 <...
asked by 16.08.2017 / 18:13
1
answer

Write array values in Mysql

I'm trying, unsuccessfully, to write some information in my database, I have a table where the user will insert rows according to his need, but when sending the information to the bank he is recording only the last information. The table form...
asked by 01.08.2017 / 23:57
1
answer

Send null date if it is not filled

How do I insert a date null into this function? $data_saida = $this->post('data_saida'); //aqui pega a data se não for vazia e formata if($data_saida) { $arraydata = explode("/", $data_saida); $diamontado...
asked by 22.08.2017 / 21:43
1
answer

Increment even if you delete record

I have the following problem, I have the following function: public function codigo_denuncia() { $db = new mysql(); //pegar as linhas do ano $ultimoRegisto = $db->executar("SELECT id FROM denuncia WHERE ano=year(now())...
asked by 22.08.2017 / 14:09
1
answer

SQL command does not work with select [closed]

Follow my complete code: <? include("conectar.php"); $query = "select * from pagseguro ORDER BY Referencia DESC"; $result = mysqli_query($db, $query) or die(); if($_REQUEST['alterarStatus']){ $status = trataaspas($_REQ...
asked by 18.09.2017 / 15:55
2
answers

login with cpf or email in php

I'm having a problem when making a login system that the user must be able to authenticate through their e-mail or cpf. I am doing the comparison with the value of the login field received, if it is number I do search with cpf and if not I do...
asked by 23.09.2017 / 15:07