Questions tagged as 'php'

1
answer

I am not able to enter data in the bank

I am not able to enter data into the database, I was using PDO , but now I started to use MySql , because I was only able to list database data with MySql , I am able to list the data, but I am not able to insert. <?php $h...
asked by 17.10.2018 / 21:53
1
answer

PHP - How to find the least common element in an array

The work consists in creating 2 arrays with random numbers between 0 and 30. These 2 arrays should be drawn from the most common element to the least common one. Then I have to show the most common, less common element to the screen, and whic...
asked by 10.10.2018 / 18:06
1
answer

Insert attempt before error (PHP)

I have a student enrollment system in a college system. Part of the code where the error is or is not: while (($matricula = fgets($handle, 1024)) !== false) { $cont++; erro("Lendo matricula $cont de $qtde_mat...
asked by 19.11.2018 / 21:59
1
answer

Mount PHP two-dimensional array

I need to mount a two-dimensional array through 2 arrays received via post. Sample arrays I get: Array ( [0] => disc03 [1] => disc04 ) Array ( [0] => prof03 [1] => prof04...
asked by 19.11.2018 / 20:21
1
answer

Problems with cURL using Face ++

I'm using a Face ++ API for face recognition. I put a code in PHP that sends a face.jpg to their API according to the rules in the documentation, but this cURL either is not sending the data or it is not working, because in Linux in...
asked by 09.08.2018 / 17:02
1
answer

How to return reregistered records between tables in laravel

I have 2 city and state tables I own the parana state and would like to know how to return all cities related to Parana state in a simple way without having to make a loop of repetition Type $estados = App/Estado::all(); $cidades = App/Cida...
asked by 20.11.2018 / 12:18
2
answers

SQL Parameter in PDO PHP does not work

The following code returns 11 bank records: $dbh = new PDO('sqlite:db_coleta.sqlite3'); $sth = $dbh->prepare('SELECT * FROM ROTA_VIEW WHERE usuario_id = 1 AND 0 = 0'); $sth->execute(); $red = $sth->fetchAll(); var_dump($red); But...
asked by 07.08.2018 / 14:42
1
answer

Configure CSS to generate a new column when it reaches overflow

I'm generating a list of links dynamically using PHP, but this list is very large and I would like it when it reaches a certain height in px the column would be broken by 2, 3, or as many as needed. Eg: Make a list even though it is in HTML...
asked by 17.07.2018 / 19:12
2
answers

Using links with PDO in PHP

I'm trying to create a PDO loop where I can choose the desired field to position it on the page. But the code I'm using is bringing all the fields in one go. My code looks like this: include("libraries/conn.php"); $sql = "SELECT content...
asked by 19.07.2018 / 16:29
2
answers

Inner with 3 tables PHP / SQL

I have 3 tables and I want to compare the value of them, I can do with 2 using JOIN , but when I put JOIN on the third
asked by 05.09.2018 / 17:04