Questions tagged as 'mysql'

2
answers

Bring SQL statement and move to PHP variable

I have this SQL / PHP statement echo '¡Hola ' . htmlspecialchars($_POST["div"]) . '!'; $sql = "SELECT id_div FROM divisiones WHERE division_name = '$_POST[div]'"; $res = mysqli_query($conexion, $sql); And what I want is to pass the id_d...
asked by 20.09.2018 / 16:37
2
answers

How can I avoid Duplicate Registration in MySQL?

I'm trying to make a validation to avoid that the user or users avoid double posts, that is to say that the mail data in the user table within MYSQL PHPMYADMIN does not repeat, my code is as follows <?php require_once "Conexion....
asked by 12.08.2018 / 22:41
4
answers

Error inserting MySQL data with PHP

Can someone help me solve this error? the error that throws me is the following:    "Warning: mysqli_query () expects parameter 1 to be mysqli, null given   in ... " <?php include 'odbc.php'; /*datos personales*/ $nombre = $_POST['nom...
asked by 09.12.2017 / 07:05
2
answers

How to show a single record in PHP

I have the following code, it connects to the database and executes a query and I store it in result2 until it is all right, but at the time that I print the records I want that only prints a single record only the date and time and not t...
asked by 05.10.2016 / 23:49
2
answers

Show more than one item in a Listview item

I need to show 3 fields of a table of a BD within a item in a Listview , what I have so far is that it shows the data but in different items . Any ideas on how to include everything in a single item? jsonArray = new JSONArray(resul...
asked by 12.01.2017 / 15:41
2
answers

Mapping database with Laravel

I have to do a web project in php and I know general aspects of Laravel, so I would like to use it in the development, what stops me for the moment is to map the database that I have created in mysql with laravel, it is possible to do this? I wa...
asked by 12.07.2018 / 07:58
2
answers

query three tables with INNER JOIN

Hi guys, the problem I have is the following, I have three tables "post", "copies" "Friends" related to each other. I explain in the table FRIENDS the ids of the friends' sessions are saved among them, in the post table the information of thos...
asked by 23.07.2018 / 18:31
2
answers

Update a div with ajax when there is a change

I want to make a div recharge only when it finds a modification in the database I currently have this so, if you can help me I would appreciate it is for a shift system that I am doing <?php $result = $mysqli->query("SELECT * FRO...
asked by 27.07.2018 / 17:58
1
answer

Show contents of a database with php

I'm doing a job for the school, in which they ask me to do a "mini replica" of what would be twitter, so we can see data handling with php and so on. Well, I have reached the point of registering users, logging in and saving tweets in a database...
asked by 06.04.2018 / 18:49
1
answer

Is it correct to create a class with static methods to connect to a MySQL database?

I am starting to learn php and MySQL and I have the doubt of whether it is right to create a class with static methods for the connection. The class that I created is this: class ConexionBD { private static $conexionBD; public sta...
asked by 11.04.2018 / 02:36