Questions tagged as 'mysqli'

1
answer

Enter $ value to a field and depending on the value, modify another field

I have two columns:    stock = string "yes" or "no" And the other column with amount:    stock_c = value 0 to 100 (limit 100) Use utf8_general_ci collation and the columns are in the products table What I want to achiev...
asked by 27.01.2018 / 19:35
1
answer

Select certain MySQL table rows

Well, I have the following code: function dameTodosLosProyectos( $con, $cantidad = 0 ) { if( $cantidad > 0 ) { $query = "SELECT * FROM proyectos LIMIT $cantidad"; }else { $query = "SELECT * FROM proyectos";...
asked by 06.02.2018 / 12:49
2
answers

Error sending data with prepare and mysqli

I am trying to send information to my database after making two queries, the first if the user already exists and the second if the email already exists subsequently made the "upload of information" to my database with my sentence prepared This...
asked by 03.04.2018 / 04:12
1
answer

Problems with Login in php

Well, I am trying to make a login for a page which when validating the user redirects to a new page, the problem is that when I enter the data to enter, which I am completely sure exists in the database, always The answer is that the data is inc...
asked by 17.01.2018 / 21:05
1
answer

How to compare different arrays of the $ _session

I'm trying to make a comparison after session_start(); What I was thinking and trying to do is: <?php session_start(); if($_SESSION['id_usuario']=NULL) { $_SESSION['id_nivel']=3; if($_SESSION['id_usuario']=...
asked by 02.02.2018 / 17:33
1
answer

Error mysqli_connect (): (HY000 / 2002): php_network_getaddresses: getaddrinfo failed: Unknown host

I am in my first steps of programming in PHP and I find this error . This is my configuration file This is my connection file This is the error that comes to me in the navigator. Warning: mysqli_connect(): php_network_geta...
asked by 15.12.2017 / 03:05
3
answers

Problem with jquery Notice: Undefined index

Good morning I have a problem with the combobox and the jquery , the event is not "activated" from the drop-down menu (I have 2 dependent menus mark-> model) script that is in the html head <script language="javascript" src...
asked by 21.12.2017 / 21:18
3
answers

Paginate a mysql table with DataTable

I have a table that brings mysql data in PHP, and I have the DataTable Scripts, but it does not page the table. What should I do to get the table, Thanks in advance. <table> <head> <meta charset="utf-8"/> <meta htt...
asked by 26.01.2018 / 16:08
1
answer

Select max ID in PHP

I am doing a simulation of a codeigniter system which works with MVC. I'm trying to pass the last ID of my "users" table to a field called "user_id " from my table "clients" (Since they are related to an FK) and everything so that from a...
asked by 06.12.2017 / 00:43
1
answer

PHP mysqli_query () It does not work

I am learning to connect MySQLi PHP with MySQL, I made this CRUD but it does not work correctly. Only works in table Alumno , but not in table Matricula . I already tried with mysqli_multi_query() and with different...
asked by 25.11.2017 / 01:20