Questions tagged as 'mysqli'

3
answers

Divide a date into two parts

I'm making a calendar using MySQL, html, JS and PHP. This calendar is for reserving the ballroom here in the building. There may be two reservations the same day, morning and afternoon that would be "00:00 to 11:59" and "12:00 to 23:59"....
asked by 29.12.2015 / 18:44
1
answer

Calculate distance between 2 points in Google maps

I do not have much experience with javascript and I have no idea how to get the result of this script and move to a <input text> field. This script calculates the distance and time between two points. So I wanted to take the time an...
asked by 05.02.2015 / 05:07
1
answer

How to link tables that are in different databases?

I would like to know how I can link two tables that are in different databases in order to find data that is similar in both tables. For example, we can have the Purchasing to-do list table and Purchased shopping list table table, to end...
asked by 09.01.2018 / 08:35
2
answers

MySQLi does not execute insert within a function

I have this function: function envia($mensgem) { $odb = mysqli_connect(HOST, USER, PASS, DATABASE); mysqli_query($odb, "INSERT INTO pedidos VALUES ('$mensagem')"); mysqli_close($odb); } I use this function on another page callin...
asked by 19.11.2016 / 06:13
2
answers

How to write this MySQL code correctly?

I'm trying to adapt to mysqli_ since mysql_ can be at any time discontinued now that new concepts like mysqli_ and pdo have appeared. I am trying to write this script that pulls the information from the database but it is not working. What could...
asked by 15.08.2014 / 16:09
2
answers

Add values from a select when repeating the client id

How could I sum the values of a select when it repeats the client id? Example Use this select: $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "myDB"; // Create connection $conn = new mysqli($serve...
asked by 28.12.2018 / 11:54
2
answers

Doubt with connection to php database with mysql

I am learning about php and mysql, I see several tutorials on the internet and a doubt that I came up with is, I see that if you create several variables and then you put these variables in the command, $servidor = "localhost"; $usuario = "root...
asked by 10.07.2016 / 19:34
3
answers

Can I use "mysql_real_escape_string" in site "mysqli_connect"?

Can I use the mysql_real_escape_string function on a site built in mysqli_connect ? And if so does it make any difference or would the protection be less? Or should I use mysqli_escape_string ? Because when I put mysqli_...
asked by 10.12.2015 / 13:20
1
answer

Functions PHP + MySQLi

I created a function in php for cruid in the database but the function Read is in trouble and I can not understand why, it follows the code: function DBRead($table, $params = null, $fields = "*"){ $table = DB_PREFIX...
asked by 12.07.2015 / 09:12
1
answer

Password security: Should I use Mysqli - real_escape_string or bind_param?

Mysqli = > real_escape_string I want the password storage to be as secure as possible, I am currently using only mysqli => real_escape_string : $password = $_POST['password']; $password_safe = $mysqli -> real_escape_string(...
asked by 25.05.2014 / 17:55