Questions tagged as 'mysql'

1
answer

How to make the select complete based on the selected variable in another select

I need to make sure that after choosing the product, in the quantity selection, display a list with the values according to the quantity available, for example: if you have 10 pieces of a trouser, display values from 1 to 10 in the select field...
asked by 19.02.2018 / 20:20
0
answers

Error checking variables

Good afternoon, I'm doing a job and I've come across a weird situation. I have a php page called register that is working properly. The person fills out the form in register.php, then it calls a script (validateRegistry.php) to check if every...
asked by 27.02.2018 / 20:25
1
answer

Change the directory where the folder will be created

I do this the upload where the folder is created inside the wordpress folder: if (!file_exists($pasta)){ mkdir("$pasta", 0777); } $diretorio = "img/"; foreach ($registro as $Id => $estado) { $url = $diretorio . $_FILES['Ima...
asked by 21.02.2018 / 11:09
1
answer

List results cleared in the query

Good morning everyone, I need your help in a select, I'm doing a search, I have a 4 tables: user, question, alternatives and answer. In the answer table I save the user's cpf, the id of the question and the id of the alternatives, what I want an...
asked by 21.02.2018 / 14:35
0
answers

Query works in MySQL, but not in Laravel

I run a query on MySQL that works and on Laravel does not, follow SQL : select resource_id as "pedido", count(resource_id) as "perguntas", date_received from perguntas_pos where status="UNANSWERED" group by 1 order b...
asked by 18.02.2018 / 21:41
0
answers

ERROR 1442 - Trigger AFTER INSERT - MySql

My database has the following structure: CREATE TABLE BAIRRO ( BAI_COD INT(4) AUTO_INCREMENT NOT NULL, BAI_NOME VARCHAR(200)NOT NULL, CONSTRAINT PK_BAIRRO PRIMARY KEY(BAI_COD) ); CREATE TABLE PAGAMENTO ( PAG_COD INT(2) AUTO_INCREMEN...
asked by 19.02.2018 / 01:24
2
answers

call image through response id in form

I have a form, where at each response the result is stored in the database and presented in a table: <td> <center> <?php echo date('d/m/Y H:i:s', strtotime($row["data"])); ?> </center> </td> <td> <center&...
asked by 18.02.2018 / 19:23
1
answer

Allow only queries of numbers in mysql

I'd like to know if you can prevent words, characters, and other things from being queried on a site. I'm developing a system for the history of a site, follow the script: If possible I would also like to know how to give an else in while, pq...
asked by 18.02.2018 / 23:57
0
answers

Query mysql with special condition

I'm having trouble putting together a query with two tables. In my bd I have two tables called disciplines and bulletin, in disciplines have the data of each discipline and in bulletin has the foreign keys referring the student and the discip...
asked by 19.02.2018 / 00:04
1
answer

Date function in Portuguese

I have this code <table class="table table-hover table-bordered table-condensed lista-clientes table table-striped table-bordered table-condensed"> <thead> <tr> <th> &l...
asked by 20.02.2018 / 04:33