Questions tagged as 'php'

2
answers

Creating tables with database scripts

In my application I have to create a table for each user, the tables are created the first time when the user uploads a file and with the name table_ $ id_user. And the only way I can see to create it dynamically is this: $sql_create_table1 =...
asked by 21.05.2014 / 17:19
1
answer

How to detect if a string is a regex

Assuming I have the string: $regex = "/[^a-z_\-0-9]/i"; Is there anything native to php to test if it's a valid regex? If not, what would be the best way to test this?     
asked by 01.03.2018 / 22:31
2
answers

Dynamic calculations php

Is there a possibility of doing a calculation in php, and my mathematical operations are in a variable? Ex: $operacao = '+'; $valor1 = 10; $valor2 = 10; $calculo = $valor1 .$operacao. $valor2; I would have to give Result 20, however, by def...
asked by 08.06.2016 / 20:44
1
answer

Error "Does not have a default value" when trying to insert data in DB [closed]

I was trying to insert the variables I received from a form when I received this error message:    'nidcrespons1' does not have a default value My code: <?php $link = mysqli_connect("localhost", "root", "vertrigo", "winit");...
asked by 22.03.2016 / 18:05
3
answers

Auto Relationship with Laravel

I have the following problem when trying to make an auto relationship with Laravel 5. I want to make a user registration, where users can have other users linked, creating an authoring N x N, user_user; The user will have a status, and this s...
asked by 06.03.2016 / 19:45
1
answer

How to keep the data already filled in the input after submitting a form?

I'm using the PHP language and the Laravel Framework 5. In the validation of the form, if it contains some blank field or with sizes of characters not accepted, when clicking save the system shows the message of validation, however the fields th...
asked by 30.05.2016 / 05:50
1
answer

filter records per month

I have the following query: $sql= mysql_query("SELECT dia, GROUP_CONCAT(hora) FROM marcacoes WHERE colaborador_id = {$colaborador_id} GROUP BY dia "); Returns the following table: But I want it to appear only from month 6 for example...
asked by 26.07.2016 / 19:44
1
answer

What are Native Hybrid and Web Applications?

Hello everyone, I'm kind of lost in the study of mobile computing. I'm studying these 3 types of architecture for mobile development. Does anyone know the definition of these development architectures?     
asked by 29.08.2015 / 23:53
2
answers

Database connection error

I have a problem connecting to MySQL database with PHP I am using WAMP I created a database in my PHPMyAdmin I made my connection via PHP but this error appears when I click send in my form : Thesearethecodesformyconnection:config.php&...
asked by 16.07.2015 / 18:44
1
answer

Add data to a MySQL table, with PHP. What is wrong?

Initially, I'm new to PHP and SQL, so take it easy if you have barbering in code. I'm just testing the PHP and MySQL integration, I took an example table from a book and did a quick html page to pass the parameters. HTML: (index.html)...
asked by 31.08.2015 / 04:00