Questions tagged as 'mysql'

1
answer

Save value of a variable in laravel

I'm starting a project in Laravel, and in the sidebar I have a dropdow with a list in which I access the database and I bring information from 3 companies for example, and when I click on one of these companies, I would like to save the value of...
asked by 16.08.2017 / 05:11
1
answer

Collate Last Ida Returned by Insert to Bank [duplicate]

In this Script below I make a loop where inside it I insert insert in the bank. at the end of each insert it returns the ID of the row recorded in the bank variable piece ($ sql-> insert_id.) so far everything OK if (isset($_POST['nome'])) {...
asked by 15.08.2017 / 05:29
1
answer

List duplicate data

I am suffering with duplicate data in the database and need to list them to check them and delete them. Consider as duplicate data when the value and the date coincide, as in the example below, the values A and C are duplicated. A: 2017-08-10...
asked by 10.08.2017 / 20:44
1
answer

Character "wildcard" as criterion of a query

I'm trying to create a query criteria selection engine. For example: I have a mass of data where you have the following variables: store code Brazilian state where you are Brazilian region you are in Flag of products that the store...
asked by 05.09.2017 / 14:17
1
answer

Write array column or multiple records?

I am in doubt as to the best performance / performance option in reading the data. Targeting one with many records and being accessed all the time. I need to specify which districts the customer is serving, ie a customer for several neighborh...
asked by 20.10.2017 / 02:44
2
answers

Array inside PHP Array

I'm creating a system where you can add medicines by protocols. Ex:    PROTOCOL NAME [ARRAY] NOME DO REMÉDIO [ARRAY 2] NOME DO ITEM QUANTIDADE TEMPO DE INFUSÃO [ARRAY] NOME DO ITEM 2 QUANTIDADE 2...
asked by 23.08.2017 / 21:15
1
answer

How to save a foreign key in laravel 5.3?

I'm having trouble saving the foreign key in the database. I'm working PHP , Laravel 5.3 and MySQL , below goes the code: Product Controller namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Produtos...
asked by 30.07.2017 / 03:20
1
answer

phpMailer is not getting the values from my database

I'm trying to recover email and password, where: $o_email = $_GET['email']; $celular = $_GET['celular']; Receives via email the user's email or mobile phone. But I'm not getting this recovered data to play in phpMailer. What can I be doi...
asked by 25.07.2017 / 19:46
2
answers

Update table according to column quantity

The registration table was not modeled correctly, however I need to do an UPDATE per SQL to perform this import, following example: See that the children of Bomi Bulsara, need to be in [dependent_name1] and the other in [dependent_name2], I k...
asked by 24.07.2017 / 15:11
1
answer

Logic of modeling of categories in an e-commerce

I have a project to create an e-commerce, in which my doubt refers to the modeling of the tables:    Category (ROOT)> sub-categories> sub-categories of the sub-category. How should these tables be, where a product can be within categories...
asked by 21.07.2017 / 14:17