Questions tagged as 'php'

1
answer

Limit number of rows in a table [closed]

What friends, the question I have is this: I have a table connected to a database, every time you enter a value is automatically updated, the problem I have is that it shows me all the values of the database, how can I limit those rows to show m...
asked by 05.04.2017 / 13:06
1
answer

List data with SQL Prepared Statements

I need to bring the data from the Database using an id. The Users class has the following function: public function getPerfil($id) { $stmt = $this->mysqli->prepare("SELECT id_usuario,nombre,apellido FROM usuarios WHERE id_usuario = ?...
asked by 16.02.2017 / 22:17
4
answers

Check if there is a column in the table and if not create it from PHP

I have the following problem: Check if there is a column with the name that goes through a variable and if not create with the column with the name of the variable. This is what I have tried so far: $talla= "xg"; if ($fila["codigo_articu...
asked by 21.02.2017 / 17:33
4
answers

How to set a statement so that it does not return NULL values having two conditions in PHP?

I have the following code to consult the database: <?php include_once '__conexion.php'; require "funciones/JSON.php"; ?> <?php $cedula = 111111; //No existe $estado=1; //-- Obtener Ultimo ID de sancion registrado para ese sanc...
asked by 04.05.2017 / 15:14
2
answers

Input type number teased

I come to you with a slightly easy question to see who can answer me. I have a normal input type number with its two arrows to increase and to decrease limited to a minimum of 1 and a maximum of one hundred; <input type="n...
asked by 10.03.2017 / 05:44
2
answers

Does not javascript run completely: javascript, form or echo problem?

I have two checkbox groups that are filled with database and I have a javascript function that deletes them when a radiobutton is changed (there is a radio button to show each group of checkbox), I think they are causing problems because I can n...
asked by 07.03.2017 / 17:38
1
answer

Update records using PDO

Good morning everyone, I have the following problem: I have a form where I retrieve a record from a database and an update button to edit the record in question. The part of the form where I show the data of any registry works well, the pa...
asked by 27.12.2016 / 12:52
1
answer

Avoid viewing a page without going through index.php

I have a index.php that is a form of login and that being correct the user and the password directs to another page. The problem is that if I go to the other page I can see it without having gone through the login and I want to see this...
asked by 24.01.2017 / 18:16
1
answer

FatalErrorException in Book.php line 12: syntax error, unexpected 'public' (T_PUBLIC)

Good morning. I am currently in Laravel making an application for the management of a library and when entering the model a method to upload a file I get this error:    FatalErrorException in Libro.php line 12: syntax error, unexpected   'p...
asked by 09.01.2017 / 09:45
1
answer

How to send two variables ajax, json

Hello I would like to send by post with the following code, two variables I can only send one, any suggestions? Thanks <script type="text/javascript"> $(document).ready(function() { $("#au").change(function() { $.ajax({...
asked by 10.01.2017 / 17:44