Questions tagged as 'mysqli'

1
answer

Query calculating dates with INNER JOIN

Save personal, Here has an example that a guy from the community posted here and I am trying to adapt my needs but an error arises: #1248 - Every derived table must have its own alias My query SELECT date_format(TABLE_2.data, '%d/%m/%Y...
asked by 19.11.2014 / 19:12
2
answers

Database connection [closed]

I'm having a problem making the connection to the Mysqli Database, is giving several errors, follow the errors below: PHP Warning: mysqli_query() expects parameter 1 to be mysqli, null given in D:\web\localuser\riobonitopiscinas\www\acessorio...
asked by 30.11.2018 / 13:09
1
answer

I can not insert data numbers float [closed]

<?php require_once('cabecalho.php'); require_once('conn.php'); ?> <?php $nome = $_REQUEST["nome"]; $preco = $_REQUEST["preco"]; $query = "insert into produtos (nome, preco) values ('{$nome}', '{$preco...
asked by 09.07.2018 / 22:09
1
answer

Script "most beautiful"

I am using the following code for the class User: <?php class Usuario { public $nome, $email; private $senha; private $mysqli; public function __construct($nome, $email, $senha){ $this->no...
asked by 25.03.2018 / 18:33
2
answers

Problem with bank call for listing

Good evening, I'm developing a system of hours, but I was barred by a connection problem so I could do my database listing on the screen ... When I update the page it presents me with two errors:    Warning: mysql_select_db () expects para...
asked by 10.01.2017 / 00:51
2
answers

Mysqli_fetch_array on locaweb, error logging in! [closed]

Hello, I have the following code: <?php session_start(); require_once('conecta.php'); $email = sha1($_POST['email']); $senha = $_POST['senha']; $sql = "SELECT * FROM dados WHERE email = '$email' AND senha = '$senha'"; $objDb = new...
asked by 09.01.2018 / 14:01
4
answers

GROUP BY and ORDER BY MySQL [closed]

When I send Query: SELECT * FROM tabela WHERE id_cliente = '$id_cliente' ORDER BY ano DESC Duplicate values are returned, because there are duplicate values in the table. But I want to return only once every year contained in the t...
asked by 11.07.2017 / 20:08
2
answers

How to solve the "Function name must be a string" error?

   Fatal error: Uncaught Error: Function name must be a string in   C: \ xampp \ htdocs \ Proj_solos \ php \ login.php: 11 Stack trace: # 0 {main}   thrown in C: \ xampp \ htdocs \ Proj_solos \ php \ login.php on line 11 <?php include_once...
asked by 02.08.2017 / 21:14
2
answers

Substr () does not work

I can not understand why the substr is not working. Here is the code: <?php // conexão com bd $host = "localhost"; $user = "root"; $pass = ""; $db = "loja"; $conexao = mysqli_connect($host, $user, $pass, $db);...
asked by 27.12.2018 / 13:59
1
answer

Generate sequential numbers for draw

I'm creating an online raffle system in PHP and MySQL. Firstly I create the prize draw where I inform the prize and its details, among them the amount of coupons, starting in a specific number. For simplicity, I'll raffle a car and sell 800 numb...
asked by 18.10.2018 / 20:39