Questions tagged as 'php'

1
answer

Excepcion primary key in php and mysql

I'm inserting data from a txt in a base and it turns out that a field that is the primary key is sometimes repeated, I need to generate a "report" that at the time that file is uploaded, it notifies that primary keys were repeated to the user Is...
asked by 09.04.2018 / 05:26
1
answer

neo4j- connection

Hello community, I'm new with Neo4j, I'm connecting from php, I just installed the neo4j server with the basic configuration, I try to make a request to the server with this code: require_once 'vendor/autoload.php'; use GraphAware\Neo4j\C...
asked by 09.04.2018 / 20:27
1
answer

I can not find a POO class in php

I am making a connection to a database through POO and it is throwing me an error that the "Connection" class does not find me, but I have it added as inheritance in the class "ReturnsProducts". I have 3 php files. 1) The one that makes th...
asked by 09.04.2018 / 01:00
2
answers

How to pass list of elements to database?

I have a tag in HTML and several of them I use these tags because I want to simulate a list, where I can add elements, select them and modify them as well as delete (I already do this by JavaScript). at the time of passing them to the database t...
asked by 09.04.2018 / 03:17
1
answer

Passing data between .php files

can you help me in a doubt I have a file called a.php and another b.php I need to pass a lot of data from the a.php file to the b.php file I'm doing it with the GET method as follows: But the URL bar becomes excessively full Do...
asked by 07.04.2018 / 02:27
1
answer

How to make redirects in Apache2 in Ubuntu 16.04?

I have the domains mycompany.com & mycompany.com.co Goal : I want all traffic to go only to www.mycompany.com Doubts : In which file should the redirect be located in the Virtualhost directly or in an .htaccess file? If it i...
asked by 08.04.2018 / 10:52
1
answer

Warning: mysqli_query () expects at least 2 parameters, 1 given in php on line 160

I need help with this error ... my code is as follows (some guidance please): I already made the corresponding connection to my bd ... I try to fill in a form with data (inputs) at the moment of pressing button. .. execute that code, relating th...
asked by 22.05.2018 / 05:40
1
answer

Problems retrieving fetch records ()

This class obtains the records in the table. The select has only some fields in the table. I have some questions: 1) Why does $ records only save the last record if it is inside the while? 2) The result of the query is within $ row , is...
asked by 21.05.2018 / 23:59
1
answer

SQLSTATE [42000]: Syntax error or access violation: 1064

I get this error when I run the application:    SQLSTATE [42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''...
asked by 22.05.2018 / 11:20
2
answers

What is the best way to establish a value of a dropdown from the database [closed]

I have a dropdown of blood type, and the values are hardcode, but when entering the interface, which is the best way to set the value previously saved from the database, I'm doing something like this: <select class="selectpicker" id="'.$key...
asked by 18.05.2018 / 17:11