Questions tagged as 'mysql'

1
answer

search all records for the past 12 months including zero

I have my table bud_quotations and I want to fetch all the records that have been inserted in the last 12 months, including months that have no records. Now the count is not working, always returning zero in the count. And what I want...
asked by 02.03.2017 / 16:20
1
answer

SELECT DYNAMIC CODEIGNITER - AJAX

Hello! I have the following tables: tbl_encargo tbl_category tbl_encargo Since in tbl_lacamento there is a field ( id_categoria ) that receives the ids of tbl_categoria and tbl_categoria receives its id (...
asked by 19.06.2017 / 23:04
2
answers

MySql select multiple columns from the same table with conditions

I need to select some data from a single table depending on the type of user, for example, an Individual user will have the RG and PIS field while a user will have the state Registration and Fancy name field. I can execute a similar query wit...
asked by 20.06.2017 / 21:07
4
answers

How to send form data to mysql?

I'mtryingtosendformdatatomysqlbutgiveerrorNotice:  ArraytostringconversioninC:\xampp\htdocs\Projects\orders.phpon  line16Line16isthis  $sql="INSERT INTO spedido (table_name, order, quantity)   VALUES ('$ number', '$ order', '$ quantity') ";...
asked by 18.01.2017 / 16:26
1
answer

Export MySQL database with foreign keys

My hosting uses phpMyAdmin to manage the bank and does not allow the remote connection to be a free plan. I need to export my base to the hosting, I generated the .sql file with the command mysqldump -h host -u user -p base --routines >...
asked by 18.01.2017 / 22:12
2
answers

How to make a select that returns the expected result

Hello, I have 3 tables in Mysql Categorias , VideoContemCategoria and Videos I'm trying to make a select where I return all categories and along with each category return the last video that was published in relation t...
asked by 16.02.2017 / 00:35
1
answer

"No database selected" in PHP with MySQL

Columns to receive data: $GravaLinhaBanco = "INSERT INTO 'trechosmonitora_cotacao' ('Codigo', 'CodTrecho', 'CodCliente', 'CodLoja', 'Url', 'Rotulo', 'Trecho', "; $GravaLinhaBanco = $GravaLinhaBanco . "'Origem', 'Destino', 'Tipo', 'Status', 'Id...
asked by 15.02.2017 / 18:04
1
answer

Code is not being read completely

In my Controller file, only the 'Return View' is being read, the next code goes straight through and ends. public function naocadastrado() { return View('/naocadastrado'); $user = new \App\User(); $user->Name = Input::get('Nam...
asked by 23.03.2017 / 13:20
2
answers

Field 'Hash' does not have a default value

When I try to insert into a table this error appears Field 'Hash' doesn't have a default value mysqli_query($conn, "SET SQL_MODE = ''; INSERT INTO ".SQL_TABELA."('Chave', 'Nome', 'Categoria', 'Tamanho', 'Link', 'Hash', 'Tipo', 'Parceiro...
asked by 31.03.2017 / 17:32
1
answer

Search for records on a certain day of the week

Personal I have the following select set temp = Conn.Execute("SELECT * FROM tbl_estacionamento ORDER by id asc") I have a table named date where I record the day of the information record, I would like to know how I can only display results...
asked by 25.03.2017 / 11:46