Questions tagged as 'php'

1
answer

Problems working with PHP Classes

I am working with classes in php and it gives me the following error Deprecated: Non-static method EnlacesModels::EnlacesModel() should not be called statically, assuming $this from incompatible context in /home/u430635434/public_html/travel-...
asked by 02.03.2018 / 21:11
2
answers

What is fetch () in MySQLi prepared query?

On the official PHP page there are several examples but all with different names. Searching the web is spoken but in PDO, looking for StackOverflow the same is spoken in PDO. But what does it mean in sentencing procedures prepared in MyS...
asked by 05.03.2018 / 02:54
2
answers

Problems with an associative Array in php

I have a book class that has among its attributes an array where the records of each loan that is made of the book (reader code, loan date, estimated return date and real return date) must be kept. To do this, I first use the prestar() f...
asked by 05.03.2018 / 00:46
1
answer

How can I enter the data of a query from a database in mysql in a jump menu?

if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { <select id="nom" name="nom"> <option value="1"> .$row['nombre']. </option> </select> }
asked by 05.03.2018 / 01:52
1
answer

Save file to the FPDF desktop

I'm trying to get FPDF to save the file directly to the desktop but I can not find it, I keep saving it in the downloads folder and it gives me the name of the file. Can someone help me? $pdf->Output('/C:/Users/Desktop/Fichas/ficha.pdf','D'...
asked by 05.03.2018 / 09:27
1
answer

Syntax error when creating PHP function

Good day, I have this problem when running a function in PHP, if someone can help me, I thank you in advance public function actionIndex() { // ejecución de la tarea de etl $job = new Job(); Job::start()...
asked by 10.03.2018 / 04:08
2
answers

Change of alert by sweet alert

if($resultado_pendientes>=1){ echo "alert(\"Usted posee 1 solicitud cerrada parcialmente por el departamento de sistemas, valide y cierrela antes de crear otra nueva.\"); document.location=(\"./listTicketUnrevi...
asked by 09.03.2018 / 12:25
2
answers

Go through an array with a FOR loop

I'm trying to repeat N times an array with a FOR loop, but I've been stuck in the last array that contains more elements. This is my code so far. $datos = array(); for ($i = 1 ; $i <= 50 ; $i++) { $medidor = 'medidor'.mt_rand(1,99);...
asked by 12.03.2018 / 15:25
1
answer

Show URL depending on database value

I have the following table in my database: I want that depending on the values of android, ios etc a different url is shown. For example if android is 1 for this user, it shows the android website. The code I have used is the followi...
asked by 25.03.2018 / 19:06
1
answer

When trying to insert data into the DB I get an error [HY093]

The fact is that I am trying to insert users through PDO and CRUD and this is generating an error which I can not solve. The error is exactly this    SQLSTATE [HY093]: Invalid parameter number: parameter was not defined File containing...
asked by 22.03.2018 / 11:40