Category "mysqli"

Mysqli multi query error

I need to execute two or more queries at a time, fetch them one after another. Then I need to bind param and bind result in each one of them. I am trying this

Pass a select with mysqli_fetch_row to a table

I have a problem with passing the query that returns a number of records, I already have it with a select that returns an input, but this only works with one re

How to execute sql code based on fetch array

I have a search engine that I found on google and I would like to search in the 'barcode' database that I have and if it finds the person it executes the code t

Warning: mysqli_stmt::bind_param(): Number of elements in type definition string doesn't match number of bind variables 11 [closed]

My code against SQL injection isn't working (error message in title). I simplified my code, but its still not working. <?php include "con

Fatal error: Uncaught mysqli_sql_exception: Unknown database 'test' in ... (How do I fix that? Using PHP)

my connection: $con = new mysqli('localhost', 'root', '', 'test'); it does not work with that either: $con = new mysqli('localhost', 'root', '', 'test'

After submitting the data from the form it directs to white screen

I have an issue when I clicked the button and submit the data from the form.it gets directly to the white screen and nothing happen I checked the database it do

phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO)

I keep getting the following errors with mysql connection through XAMPP and I don't know what to do: That's the code in the config.inc.php <?php /* * Th

Unsure why I am getting: Number of variables doesn't match number of parameters in prepared statement

I am trying to do a simple test but am experiencing errors. I am trying to add the parameters and I have done some research, none of which has helped me underst

Fatal error: Uncaught Error: Call to undefined method mysqli_stmt::fetch_assoc() [duplicate]

i'm trying to learn mysqli. i get this error: Fatal error: Uncaught Error: Call to undefined method mysqli_stmt::fetch_assoc() in C:\xampp\h

Correct way to use LIKE '%{$var}%' with prepared statements?

This does not work $sql = 'SELECT * FROM `users` WHERE username LIKE \'%{?}%\' '; Warning: mysqli_stmt::bind_param(): Number of variables doesn't match numbe

PHP Startup Unable to load dynamic library /usr/lib/php/20151012/php_mysqli.dll

I have ubuntu 14.04 EC2 instance. I have installed php 7 on it. when I execute any php command like php --version or any other. I get following error PHP Warni

Call to a member function fetch_field() on a non-object MySQLiDB

Hi i cant use INSERT UPDATE function with this class: MySQLiDB. Im trying write data to mysql and if exists this data then need update. So i use INSERT ... ON D

How to disable Warning: mysqli_result::fetch_array(): Couldn't fetch mysqli_result [duplicate]

For my PHP I get a warning message: Warning: mysqli_result::fetch_array(): Couldn't fetch mysqli_result in /var/www/scorebord/loader.php on l

MySQL connection and disconnection frequency

Is it better to open and close a new MySQL connection every time a query is made or to keep the connection open and run multiple queries in a single MySQL sessi

MySQL connection and disconnection frequency

Is it better to open and close a new MySQL connection every time a query is made or to keep the connection open and run multiple queries in a single MySQL sessi

Query with MySQL event

I try to perform this query with Zend DB: $this->db->query(" CREATE EVENT turn_tonormal ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVA

Mysqli Output to a table

So my goal is to output some mysql info to a table. I want it to start a new column every 18th record. Here is my current code: $hostname = "localhost"; //SET

Query to get top 5 users by total month sales amount

I was hoping you could help me figure this out. I would like to run a query that would search a table and all it's rows and the date matches the current month.

MySQL server has gone away without huge data but due to long time

The script takes too much time and so I am getting this error. I will try to optimize it. I want advice, will using, mysql_pconnect is better than mysql_connect