Questions tagged as 'mysqli'

1
answer

Warning: mysqli_query () expects at least 2 parameters, 1 given in

This is a login that re-calls itself executing the code that is found before the form. I have googled but I do not find help similar to mine. Osea with calls to the database of the type of this query: if (isset($_POST['submit'])) { $query =...
asked by 13.11.2016 / 04:12
1
answer

Fill data to a custom ListView from server (Web Service)

Good afternoon. I'm running a web service on Android, in this case I'm pulling data from a table in MySql that I have on a server to populate a custom ListView. The query I have is that the data I'm trying to get is not being populated in...
asked by 05.01.2017 / 20:52
1
answer

How to make records in the database with PHP?

This is the code I have made <?php $enlace = mysqli_connect("localhost", "root", "", "loteriav2"); if (!$enlace) { echo "Error: No se pudo conectar a MySQL." . PHP_EOL; echo "errno de depuración: " . mysqli_connect_errn...
asked by 28.08.2016 / 01:28
2
answers

script to support mysql databases in php, but I need to migrate to mysqli

<?php backup_tables('XXXXXXX','XXXXXXX','XXXXXXX','XXXXXXX'); /* backup the db OR just a table */ //En la variable $talbes puedes agregar las tablas especificas separadas por comas: //profesor,estudiante,clase //O déjalo con el asterisc...
asked by 27.08.2016 / 00:04
1
answer

Restore table backup in sql and php

<?php $dbhost = 'XXXXXXX'; $dbuser = 'XXXXXXX'; $dbpass = 'XXXXXXX'; $conn = mysqli_connect($dbhost, $dbuser, $dbpass); if(! $conn ) { die('Could not connect: ' . mysql_error()); } $table_name = "chofer"; $back...
asked by 29.08.2016 / 21:46
3
answers

Special characters, spaces, accents and XSS in PHP registry

I have a problem that leaves me vulnerable when it comes to registering new users in my database. I wanted to know this: 1. Scripts in register, 2. Accents in register, 3. Special characters, 4. Spaces in name 1. <script>alert("alerta")&...
asked by 15.07.2016 / 01:56
1
answer

There is some way to automatically fill an array for json

I do a mysql query, the data in the table I load each one in a variable and then I return each one in json, I find it tedious to do field by field, is there any way to do it automatically? this is the code. <?php if (!function_exi...
asked by 12.06.2016 / 00:10
1
answer

Export Mysql Data with php

Greetings, I'm trying to export mysql data to an EXCEL using php, The problem I have is that when I try to export the data is not exported, that is, it shows the data on the screen again, but it does not give me the window to export .....
asked by 11.09.2016 / 11:57
2
answers

Count times a record appears in Mysql [closed]

I have this mysql table As you can see in the day column I have two days "po" and "20", what I need is a query that returns me the number of days that are registered, which in this case is 2. I have this: SELECT COUNT(*) AS total F...
asked by 20.12.2018 / 01:01
1
answer

Why do I receive different values in the same mysqli php query?

I have a problem with a mysqli login validation query, the problem is that there are two queries of the same function but obvious of different variables, one throws me an object result with an array of values, and the other returns bool ( false)...
asked by 26.11.2018 / 00:41