Friends, my intention is to receive the value of a type = datetime field from MYSQL in a php file
$sql=mysqli_query($con,"select fecha FROM tabla1 WHERE campo1=1");
$rw=mysqli_fetch_array($sql);
$fecha_que_recibo=$rw['fecha'];
The d...
I have my connection to the bd so
$conn = new mysqli(server,user,pass,mainDataBase);
un procedimiento almacenado que devuelve una tabla
$sql = "call sp_escap()";
$result = $conn->query($sql);
y las imprimo en el label
while ($r=mysqli_fetch...
I have a question, I would like to save a UPDATE within a variable, for example, this is my code:
public static function cancelTareasP(Usuario $_Usuario, $proyecto_id) {
$conex = $_Usuario->getConexBD();...
I have this file alta.php , what you should do the IF is to see if the user uploaded image or not, and then store it in the database or do not.
This is not happening and I do not find the problem.
I leave the codes:
Alta.php
$categoria =...
I have a form to update data in a database what makes me this form is that it does not update anything but it does not throw ERROR
$host="localhost";
$usuario="root";
$contraseña="";
$base="comercio";
$conexion= new mysqli($host, $usuario, $...
I'm doing this insipid query:
$sql = "SELECT * FROM noticias WHERE vigente=1 ORDER BY fecha DESC";
date is a DATETIME field. Theoretically you have to sort the result from the most recent to the oldest ... well, in PHPMyAdmin it works perfe...
In this code I have a small example of how to load CSV:
$message = "";
if (isset($_POST['submit'])) {
$allowed = array('csv');
$filename = $_FILES['file']['name'];
$ext = pathinfo($filename, PATHINFO_EXTENSION);
if (!in_array($ext, $allowe...
I want to show some concrete data of my database in a widget of my wordpress by means of a php function and a query to a MySQL database, but the problem that I am having is that it is shown in the letters with accent. My HTML has this formatte...
I tried to do it that way but it gives me eror
$consulta="Select * from usuario where nickname='$usuario' and pass='$pass2'";
$resultado=mysqli_query($conexion,$consulta);
$filas=mysqli_num_rows($resultado);
$row=mysqli_fetch_array($res...