Questions tagged as 'mysqli'

2
answers

Result of a NULL query

Sorry I have been trying to make umeo next select: $sql =mysqli_query ($mysqli, "SELECT hour_out FROM registro_lista WHERE num_c="316115377"); I know from phpMyAdmin that the field I'm looking at is NULL But I want to finalize it in an I...
asked by 17.07.2018 / 05:10
2
answers

Declare output variable. MySql stored procedure

DELIMITER $$ CREATE PROCEDURE 'capturar_consecutivo'(numero int) RETURNS int BEGIN DECLARE num int DEFAULT 0; SET num = ( SELECT * FROM consecutivo where consecutivo.numero=numero ); RETURN num END $$ DELIMITER ; I'm trying to crea...
asked by 30.08.2018 / 16:35
3
answers

How to register data in a database by clicking on a HREF?

I have this PHP code that lets me know if I have registered friends (when I enter their profile, there is the button that says ADD), if the user is my friend it says AGGREGATED.very good. But I would like you to help me When I press the button (...
asked by 25.09.2016 / 20:35
1
answer

How to execute 2 or more stored procedures with mysqli in php?

I have 2 procedures stored in the same file, the connection is made correctly because if I delete any of the 2 procedures, the other one shows information but if I leave both, only the first one is executed. I have the file conectar.php...
asked by 30.12.2016 / 19:58
2
answers

Show first word of a field in SQL

I have the need to get the first word of a data from the table. I have searched for information but I only see to get the characters you want. <?php $usuario = $_SESSION['username']; $pass = $_SESSION['password']; $results =...
asked by 04.09.2018 / 12:41
2
answers

problem with a query prepared in php and mysqli

I would like to ask for your help with the code of a registration form which I am trying to change to use prepared queries: $registros2=mysqli_query($conexion,"SELECT id_cliente FROM clientes WHERE correo='$correo'"); $fila2=mysqli_fetch_array...
asked by 27.07.2018 / 02:34
1
answer

mysqli-affected_rows does not work with stored procedure

I have a piece of code that inserts a record in the persona (id_persona, apellidos, nombres) table, I'm using MySQLi and PHP5 and I have the following: $query="CALL persona('".$nombres."','".$apellidos."')"; $mysqli->query($query); $...
asked by 28.12.2015 / 06:22
2
answers

Help does not display data from the foreach smarty table

My problem is that it does not show the data of the query friends I would like to know because, by the way I am new programming this is my index.php <?php include 'header.php'; session_start(); if(isset($_SESSION[...
asked by 19.05.2016 / 00:52
2
answers

Validate a dynamic Combobox with PHP

Currently I have a dynamic combo where when selecting a State you throw the due Municipality to which that State belongs. What I want is to validate from the server side that the selected municipality actually belongs to that state, since it...
asked by 28.08.2018 / 00:11
1
answer

Problem with mysqli_multi_query, it does not run when doing multiconsults

The problem is that I do not know how to execute the third multiconsult, I did it this way, the first two queries if they are executed, but the third one no longer. Here the code: <?php if (isset($_POST['place_order'])) { require 'php/lib-g...
asked by 23.08.2017 / 17:19