Questions tagged as 'mysql'

2
answers

Is it possible to manipulate SESSION variables to perform SQL Injection?

I am not a cyber attack specialist and I have a small question about the safety of my projects. Basically one of the ways I'm warned of SQL injections is by creating a " treatString () " function, for example, and all data coming in externally I...
asked by 24.07.2018 / 17:28
2
answers

Help in a PHP logic

I have a big problem for me * ini_set('display_errors', true); error_reporting(E_ALL); header('Access-Control-Allow-Origin: *'); # header('Content-Type: application/json'); header('Character-Encoding: utf-8'); define( 'MYSQL_HOST', 'l...
asked by 10.05.2018 / 22:04
1
answer

Connection in separate databases PDO - (multi-tenancy)

I have the following example for my application: I have a PHP + MySql application, with PDO connection, I need the application to be shared with all registered companies, however each company will have its database separately. APPLICATION ST...
asked by 28.06.2018 / 03:40
1
answer

MySQL and PHP clustering

I need to group a query with a detail, grouping should be done only when the information is repeated in sequence, for example: id nome 1 lucas 2 lucas 3 marcos 4 lucas 5 marcos In the example above, only the "lu...
asked by 12.01.2018 / 16:56
1
answer

How to insert the loaded button into the database

In my code I have 3 buttons, which serve for the user to sort the service: <input type="submit" name="verde" class="verde" value=""> <input type="submit" name="amarelo" class="amarelo" value=""> <input type="submit" name="vermel...
asked by 05.06.2018 / 14:02
2
answers

When trying to set column to Unique, error is generated speaking 767 bytes [duplicate]

When I try to run a migration in Laravel, the following error is generated:    [Illuminate \ Database \ QueryException] SQLSTATE [HY000]: General   Error: 1709 Index column size too large. The maximum column size is   767 bytes. (SQ L: alte...
asked by 08.12.2017 / 18:33
1
answer

(SQL) Each property has several images and a cover image

Suppose I have a Property table where a property can have multiple images. I have, therefore, another table, Images, with the url. I also have an intermediate table that makes the N: N relationship between Real Estate and Images. If I w...
asked by 15.12.2017 / 15:27
1
answer

.csv export with row complement based on a fixed number

I have a MySQL table of products. I need to create a .csv export of them. The products are on the bench as follows: cod produto valor pagina 123 caderno 1,00 1 456 lápis 1,00 1 789 borracha 1,00 1 112...
asked by 18.12.2017 / 20:15
1
answer

MySQL Connector for Python 3

I'm doing a project with Django and Python 3 but I can not find the appropriate MySQL connector. django.db.backends.mysql works, but only for Python 2, and I wanted to avoid using that version. In the terminal when I type import djang...
asked by 12.03.2015 / 20:37
1
answer

Print table with ajax and php

I am trying to print a table using php, ajax and mysql. I have this stretch in Html <!DOCTYPE html> <html> <head> <title>Teste Ajax</title> <?php require("cabecalho.php"); ?> <script src="//code.j...
asked by 30.11.2017 / 17:37