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...
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...
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...
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...
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...
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...
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...
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...
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...
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...