Questions tagged as 'mysql'

2
answers

How to insert multiple arrays into a MySQL table

I get via Ajax a $_POST request with 5 indexes and the last 3 are Arrays. It looks something like this: Array ( [c] => [s] => [dt] => [nl] => Array ( [0] => valor1 [...
asked by 07.04.2014 / 02:51
2
answers

Create profile page according to user

I want to make every user registered on my site have their own profile page, where all users will be able to access it and see the information, such as name, email, date of birth, etc. I know 2 things: 1st: How do I get the information in the...
asked by 06.01.2017 / 05:14
0
answers

How to use the inner join in php? [duplicate]

Can anyone help me? I have the following problem: I have 2 tables and in these 2 tables I have the names, being that in the course table I have nome and in the category table I also have the nome field. My question is this: how d...
asked by 24.01.2017 / 19:55
0
answers

How to pass data from one table to another where one has a relationship?

I created a table by migration that has relationships and I have a table with the same fields (except for the incremental id) that has the data. I need to pass the data from the table that has the data to the table that has the relationships. I...
asked by 17.01.2017 / 14:25
2
answers

MySQL error "expects parameter 1 to be resource, boolean given in"

$query = "Select * from servico where ID_SERVICO = $id"; $result = mysql_query($query); if($row = mysql_fetch_array($result)) { $nome = $row['NOME']; if($nome == 'Marketing') { include ("servicos/marketing.php"); }...
asked by 07.08.2014 / 19:13
0
answers

Cakephp 2.x if, else

I have a project in Cakephp 2.x, with the following code: <?php echo $this->Form->create('Planos', array('url' => 'addPlanos')); foreach($ListarPlanos as $indice => $AdicionarPlanos): foreach($totalPlanosAlunos as $contador...
asked by 02.01.2017 / 17:49
1
answer

Filters with PHP priority

Hello, In many web platforms, I see that there are forms, search systems, etc., where the user needs to be obligatorily, to mark some elements, be they dropdowns, checkboxes, radio buttons, but in some of them, regardless of whether they are...
asked by 03.01.2017 / 14:15
0
answers

Doubt in Binary Tree Mysql [duplicate]

Considering the tree below, I have a question. A B c D E F G H I J K So, I was wondering if there is any way to do a SELECT, where I bring all the IDS that are to the left of A. Be...
asked by 29.12.2016 / 12:08
0
answers

Streamline SQL Query with DataTables

The query below returns a DataTables with approximately 400 items in the Mysql database. The difficulty is to return these values more quickly. It currently takes an average of 70 seconds to display the list completely. It's a low...
asked by 08.12.2016 / 05:25
1
answer

accents between php and mysql how to use? [duplicate]

What is the correct way to create the database and tables in mysql 5.6 to meet Brazilian character standards? The version of my php is 5.6 and I use the following information in the header of the php files header('Content-Type: text/html;...
asked by 08.12.2016 / 19:07