I have the following folder and file structure:
-api
-v1
-libs
-Slim
-Facebook
-autoload.php
-index.php
-login.php
Inside the "index.php" I include the "login.php" include:
require_once 'login.php';
In the "login....
I'm having trouble creating the foreign key in migration.
I'm working with PHP, LARAVEL 5.3 and MYSQL.
You are giving me the following error:
Below is my code:
Table Migration of the categs
class CreateCategsTable extends Migr...
I have tabela_x , where the first field ( campo1 ) is primary key and autoincrement .
I make a simple INSERT :
$ins = " INSERT INTO tabela_x ('campo2','campo3','campo4') VALUES ($c2, $c3, $c4) ";
$con -> qu...
I have a table with multiple records , and these have a " data " field.
I generate a list of these records, I make the difference of days by comparing the " date " with the " current date ". Example:
$dias = $data_hoje - $data_registro;...
In the documentation does not leave much explained this (I think), then, what would be the difference of:
I'm using the $mail variable for the example.
$mail->Username
$mail->setFrom
$mail->addAddress
$mail->addR...
I have a code in php that has the function to get the parameter ?capa= with parse_str
<?php
$url = parse_url($_SERVER["HTTP_REFERER"]);
parse_str($url["query"],$queryString);?>
This is his code: <?php echo $q...
I am developing a web system where I need to print a label and a non-tax receipt after submitting a certain form. To perform this action, I have two printers:
Non-Fiscal Matrix Printer MP-20 MI - For non-tax coupon;
Zebra Thermal Printer T...
I have a foreach that fetches the data from one table and makes a insert in another table. I need to count the number of foreach registers, and then generate a random sequence, and feed a insert field.
See the code...
How do I create XML tags with the column names of a table from a myslq query?
In the code I made I just get the values from each cell in the table, but what I wanted was to automatically create the tags according to each column.
My Curren...