Questions tagged as 'php'

1
answer

Relate two fields to the same primary key PHP - MySQL

This is how I have the code MySQL of my tables. tasks : CREATE TABLE tasks( task_id INTEGER UNSIGNED PRIMARY KEY AUTO_INCREMENT, created_by INTEGER UNSIGNED NOT NULL, support_by INTEGER UNSIGNED, customer_id INTEGER UNSIGNED NOT NUL...
asked by 22.12.2017 / 18:05
2
answers

Error Undefined offset in PHP (Create table with stored procedure result)

I need to print the sales of the operators of each day, we do not take into account the holidays on weekends. I get the following error    Notice (8): Undefined offset: 1 [APP / View / Reports / getventas_asistencia.ctp, line 63]       Not...
asked by 18.01.2018 / 20:42
1
answer

Accelerate amount of PhpExcel

Good day, When I do the amount of files of up to a thousand records it does not delay, but when I increase the number of records it takes a long time. My question is if anyone knows how to accelerate the amount of phpexcel. Thanks in advance.  ...
asked by 22.01.2018 / 00:06
1
answer

Error Undefined index when trying to upload image in php

Greetings! I'm trying to upload an image from any pc directory, I've never tried this because I'm very lost, I hope you can help me! Thanks in advance. I'm going to skip code because there are several files. I have the form in "addProduct.php",...
asked by 14.12.2017 / 22:18
1
answer

can I execute a windows cmd command from the web?

If I have a console, can I create an application or something like for example with c # q that executes commands in my cmd console depending on a php web? I read something about rcon password, depending on server but I do not find any informatio...
asked by 21.01.2018 / 23:19
1
answer

How to remove slash inverted in json?

When executing this code: $array =array(); $sqli=mysqli_connect('localhost', 'dbuser', 'pass', 'db'); $query = mysqli_query($sqli,"SELECT * FROM usuarios"); while ($fila = $query->fetch_assoc()) { $res=array('nombre'...
asked by 14.12.2017 / 01:00
1
answer

Problem with imagecopy () throws error

I have this function but when I run it, it throws me this error:    imagedestroy (): supplied argument is not a valid Image resource       imagecopy (): supplied argument is not a valid Image resource       imagejpeg (): supplied argument i...
asked by 14.12.2017 / 16:40
1
answer

How to reverse the order of a chat in PHP?

How can I get the most recent messages on the top and the oldest messages on the bottom, the messages are stored in my database. This is my chat.php: inside is the style and a script that updates the load.php        <style> *{margin:0p...
asked by 13.06.2018 / 22:35
1
answer

modify table in mysql from a php form bringing the data from another file

Good evening, I am looking for help with the following, I want to modify a record of a table in php, I have already managed to search for the records and show links to modify and delete using the following code: <!doctype html> <?php...
asked by 07.12.2017 / 01:55
1
answer

How to get an interval between a range of hours?

I'm trying to get hours between a range of hours, example: I have 2 hours: 23:00:00 (The start) and 01:00:00 (The end) Now, through a for loop, I try to get the initial time from 30 to 30 minutes until it reaches the end. Exa...
asked by 09.12.2017 / 01:24