mysqli

Unable to install php-mysqli on PHP7

。_饼干妹妹 提交于 2020-08-22 04:36:38
问题 I have installed PHP 7, mysql5.7, Apache2.2, CentOS6. And I'm installing CodeIgniter3.0.6. When I use database connection, error occured and said A PHP Error was encountered Severity: Core Warning Message: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_mysqli.so' - /usr/lib64/php/modules/php_mysqli.so: cannot open shared object file: No such file or directory Filename: Unknown Line Number: 0 Of course there are no files in '/usr/lib64/php/modules/php_mysqli.so', but I

mysqli_stmt_close() expects parameter 1 to be mysqli_stmt, boolean [duplicate]

浪子不回头ぞ 提交于 2020-08-20 06:16:18
问题 This question already has an answer here : mysqli_fetch_assoc() expects parameter / Call to a member function bind_param() errors. How to get the actual mysql error and fix it? (1 answer) Closed last year . this was working about 5 minutes ago and has suddently stopped. It is a simple login form, please see code below <?php // Initialize the session session_start(); // Check if the user is already logged in, if yes then redirect him to welcome page if(isset($_SESSION["loggedin"]) && $_SESSION

mysqli_stmt_close() expects parameter 1 to be mysqli_stmt, boolean [duplicate]

梦想的初衷 提交于 2020-08-20 06:16:03
问题 This question already has an answer here : mysqli_fetch_assoc() expects parameter / Call to a member function bind_param() errors. How to get the actual mysql error and fix it? (1 answer) Closed last year . this was working about 5 minutes ago and has suddently stopped. It is a simple login form, please see code below <?php // Initialize the session session_start(); // Check if the user is already logged in, if yes then redirect him to welcome page if(isset($_SESSION["loggedin"]) && $_SESSION

php loop within mysqli loop

别等时光非礼了梦想. 提交于 2020-08-10 18:22:05
问题 I have one mysql table which contains 2 columns and looks like this... ------------------------------------------- | sku | superseded_sku | +---------------------+-------------------+ | part1 | part2 | | part2 | part3 | | part3 | part4 | | part5 | part6 | | part6 | part7 | the table basically shows where products sold by a company have been replaced by something newer. My task is to reshape the table to resemble the following... ------------------------------------------- | sku | superseded

Database exists but returns an error saying “Unknown Database”

天大地大妈咪最大 提交于 2020-08-05 01:58:48
问题 I installed WAMP server few hours ago into my Windows 10 64-bit computer. I used phymyadmin to create a database named ' testdb ' and tried to connect to it with a php file. I am sure that I created the database, but it returns this error: "Warning: mysqli_connect(): (HY000/1049): Unknown database 'testdb' in C:\wamp64\www\projects\index.php on line 7" Here is the php file. <?php define('DB_SERVER', 'localhost'); define('DB_USERNAME', 'root'); define('DB_PASSWORD', ''); define('DB_NAME',

Fatal error: Uncaught exception 'mysqli_sql_exception' with message 'No index used in query/prepared statement'

心已入冬 提交于 2020-07-31 05:56:29
问题 When I run the following code, I get the error saying Fatal error: Uncaught exception 'mysqli_sql_exception' with message 'No index used in query/prepared statement' $mysql = new mysqli(DB_SERVER, DB_USER, DB_PASSWORD, DB_NAME) or die('There was a problem connecting to the database'); if (mysqli_connect_errno()) { printf("DB error: %s", mysqli_connect_error()); exit(); } $get_emp_list = $mysql->prepare("SELECT id, name FROM calc"); if(!$get_emp_list){ echo "prepare failed\n"; echo "error: ",

php - bind_param inside foreach() not correctly passing

不打扰是莪最后的温柔 提交于 2020-07-22 10:23:11
问题 I'm sure this is a duplicate, but I've tried several different things on the site here and none of them are working for me. I'm calling my function in php, sending $mysqli connection, the $clientID, and the array of $tagFields to upload. It's 'working', but the values are always null. I've put echo "$tagName" inside the foreach, and it's reading it, but not sending it up to the database. $clientID, however, IS passing information. So basically all it does is upload consistently blank rows

Object of class mysqli_result could not be converted to int

我与影子孤独终老i 提交于 2020-07-17 09:25:51
问题 I'm trying to create a PHP countdown for my automated watering, I'm going to have crontab run this every minute and turn of the watering automatically. The code is as follows <?php error_reporting(E_ALL); ini_set('display_errors', '1'); include 'php_serial.class.php'; require_once 'login.php'; //connect to server $con = mysqli_connect($server,$username,$password); if(!$con){ die("Failed to connect:" . mysqli_connect_error()); } else { //check database connection $open_db = mysqli_select_db(

How to use mysqli->multi_query()?

左心房为你撑大大i 提交于 2020-07-16 07:19:05
问题 Can anyone show me how to use mysqli->multi_query() to execute multiple update/ insert queries on a single connection? Thanks. I did follow the tutorials in the PHP manual. But I have some issues. My batch of queries has 5 statements separated by semicolons. UPDATE scenes set UserID = '11111111' WHERE ID = '031DFDAD92F6F4AB64AF317C06D64089DF119EC2'; INSERT INTO surfaces (ID, Name, SceneID, SurfaceTypeID, Color) VALUES('5F9A7301C2D398C4D1B90BA5AA56A9DED3FAA639', 'front ',