Questions tagged [mysqli]

The mysqli PHP extension is a PHP database driver. Not to be confused with MySQL database.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
24 views

Need assistance with sql and php logic. (XAMPP, Mysql, PHP, LocalHost)

Program/Problem Description The goal of the page is for an athlete with specific AthleteID as determined from current session Username, to be able to select an event from the available events with ...
schoolstudent's user avatar
-4 votes
0 answers
20 views

$result = mysqli_query(Ruhrbase::$connection,$Statement); [closed]

This is a result, but is empy. What is going on? Want you see the rest of the Sorce Code? $result = mysqli_query(Ruhrbase::$connection,$Statement);
Rolf Blenn's user avatar
0 votes
0 answers
12 views

I'm trying to set a constraint for a signup system using mysqli_num_rows() but its returning me an error [duplicate]

Fatal error: Uncaught TypeError: mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given in C:\xampp\htdocs\Full Blog Web\signup.php:16 Stack trace: #0 C:\xampp\htdocs\Full ...
Aisrang's user avatar
0 votes
0 answers
14 views

How update with old image in php mysql

How update with old image in php mysql please help , i want fix this problem .. I tried but couldn't help myself thanksss if(isset($_POST['updateGift'])) { $user_id = $_POST['user_id']; $title ...
Eslam0's user avatar
  • 1
-2 votes
1 answer
45 views

mysql query inside a while loop, skips items from the loop [closed]

I'm reading a CSV file and for each line I want to query my database, but for some reason the loop skips a line every time. At first I thought it was about queries being too long, so I added ...
Mugen's user avatar
  • 19
0 votes
0 answers
22 views

phpMyAdmin and mysqli_sql_exception error [duplicate]

I can only access phpMyadmin through WHM when I have the following in my /etc/my.cnf file - [mysqld] skip-grant-tables But then I am not able to retrieve the data from mysql table in my webpages. ...
GurusGuru's user avatar
-2 votes
0 answers
35 views

How to show information from database by single column [closed]

So I am making eshop an i want to show the name of product from database but in single time so the first echo will say name(column 1 row 1) - shirt and the second echo will say (column 2 row 2)- pants,...
Ben's user avatar
  • 1
0 votes
0 answers
23 views

how to fix undefined array key? [duplicate]

i want to insert data from contact table in xampp `$query = mysqli_query($koneksi,"SELECT * FROM kontak"); $no = 1; while ($data = mysqli_fetch_assoc($query)) { ?> &...
Yurida Zani's user avatar
0 votes
1 answer
97 views

Unable to update multiple rows php sql [duplicate]

I'm a real beginner. By searching (a lot) I managed to extract the data from my database and apply the appropriate processing to them individually. On the other hand, I am unable to update the data ...
rayontik's user avatar
-1 votes
0 answers
60 views

SQL Query won't insert in the table - No errors showing [duplicate]

I am trying to create a registration page for a login system. Some of you may be familiar with this login system by CodeShack David Adams. Well, I have the query and some debug echos, and I am getting ...
Motocode's user avatar
-3 votes
0 answers
16 views

Why our this function is not running? [duplicate]

This is on contact us page code now not working. This code is running ok in our old whm now I shift to other whm it is not working. Please check what is the problem in it. `<div align="center&...
Abdul Saleh's user avatar
-1 votes
0 answers
88 views

MySQL does not let me accessed the database outside of my home network

I have been struggling to fix why does my own database I created on MySQL workbench does not let me accessed it whenever I'm using another network or I'm not on network, it generates errors. When I'm ...
ABYSS's user avatar
  • 1
0 votes
1 answer
53 views

PHP file linked to MYSQL will not open: Uncaught Error: Class "mysqli" not found [duplicate]

I want to open the PHP file linked to MySQL, but the following error keeps appearing. I've already deleted the ";" before "extension=mysqli" from the pp-ini file, and then I've re-...
user23003744's user avatar
0 votes
0 answers
24 views

syntax error : 1064 , when creating a stored procedure on XAMPP

platform: MySQL on XAMPP CREATE PROCEDURE percent(erp varchar(20)) BEGIN DECLARE percent DECIMAL(10,2); SELECT AVG(sub1 + sub2 + sub3) INTO percent FROM marksheet WHERE erp = erp; END; here i get the ...
Abhinav Gupta's user avatar
0 votes
0 answers
25 views

Server sent charset (255) unknown to the client, what to do? [duplicate]

How to solve this? For the record, I do not have access to my.ini file so that option I cannot try. I am looking for other options to solve this. I use MySQL 8.1 command client, EasyPHP Devserver and ...
jaskapaska's user avatar
1 vote
2 answers
28 views

duplicate key update with select

I have gone through several posts but unable to find the exact fix. Here is what I want - Table1 - column1, column2, column3, amount as column4 Table2 - column1, column2, column3, amount as column4 I ...
Jitesh Gala's user avatar
0 votes
0 answers
13 views

What causes the following error: DB Error: extension not found?

I received a project which I'd like to bring alive. I'd like to highlight that I've no experience with php, the last time I wrote any php was 10 years ago. My system is debian 11.5 with apache2(.4) ...
user2194805's user avatar
  • 1,251
-1 votes
0 answers
73 views

PHP Mysqli query only runs when I'm not redirecting the page afterwards

Im sitting on a basic login system and for me as a complete beginner I'm happy with it. Right now I try to set the user as online in the database. And this pretty much works. The problem is that when ...
NiklasN's user avatar
0 votes
0 answers
5 views

Error when using unserialize() function in PHP LARAVEL: unserialize(): Error at offset 1557 of 7736 bytes error

I'm encountering an issue while attempting to unserialize a large text string in PHP Laravel using the unserialize() function. The error message I'm receiving is: unserialize(): Error at offset 1557 ...
Sabir Khan Mohmand.'s user avatar
-1 votes
2 answers
117 views

PHP returns fatal error instead of error number when connecting to MySQL under XAMPP [duplicate]

My current computer has XAMPP installed and I have used it successfully to test PHP programs for some years. I recently bought a new computer and have installed the latest version of XAMPP on it, as ...
MiloMal's user avatar
  • 19
-3 votes
1 answer
75 views

Warning: Undefined variable $link (from mysql to mysqli) [duplicate]

i upgrade my code from mysql to mysqli. I edit the mysql query line and now comes the error Warning: Undefined variable $link Fatal error: Uncaught TypeError: mysqli_query(): Argument #1 ($mysql) ...
awouly's user avatar
  • 1
0 votes
0 answers
19 views

Merging $wpdb->get_results Arrays Based on Index

I am attempting to merge three different arrays for a custom post type so all the first items are one object, all the second objects are another object etc. Forgive me if I'm not wording this ...
Adam Hoidahl's user avatar
-1 votes
1 answer
92 views

Unable to get row values along with dropdown list [duplicate]

<thead> <tr> <th>User ID</th> <th>User Name</th> <th>Designation</th> <th>M a r k A t t e n d a n c e</th> </tr> &...
Jitesh Gala's user avatar
-1 votes
0 answers
20 views

When using Server: Uncaught TypeError: mysqli_fetch_all(): Argument #1 ($result) must be of type mysqli_result, bool given [duplicate]

I'm using following code: $userdata = mysqli_query($db, "SELECT RANK() OVER(ORDER BY ranking DESC) AS rank_place, user, userid, round, ranpoints, ranking FROM tournament WHERE tourid='$tourid' ...
george's user avatar
  • 13
-1 votes
0 answers
25 views

Access to remote MySQL database via SSH fails

I want to connect a MySQL database over SSH from my webserver. The access from my local database management tool works. Therefore all settings should be correct. SSH connection and tunnel are working. ...
Anja's user avatar
  • 1
-2 votes
0 answers
24 views

i have a problem when i want to connect my php script to mysql [duplicate]

$user = '***'; $pass = ''; $name = 'todolist'; $host = '***'; $port = '***'; $conn = mysqli_connect($user, $pass, $name, $host, $port); if ($conn->connect_error) { die("Connection failed:...
0x8D's user avatar
  • 1
0 votes
0 answers
27 views

i keep getting a Fetch_assoc() error:Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool a [duplicate]

<?php session_start(); if($_SERVER["REQUEST_METHOD"] === "POST") { $mysqli = REQUIRE __DIR__ . "/conn.php"; $sql = sprintf("SELECT * FROM test ...
jon white's user avatar
0 votes
1 answer
33 views

SQL to select data from depending on the common id number from different tables from PHP MYSQLi-server

Hi first time posting here. I'm trying to display the list of attendance for specific students upon parent log in. I have the db tables of both student and parent connected by the student ID (I ask ...
hobihobi's user avatar
-4 votes
2 answers
87 views

how to write a statement to determine if the user is an admin? in php

My problem per my instructions You will need to add an additional field to the members table to specify who is an administrator. This will be manually populated by the database administrator (you) ...
game pro's user avatar
1 vote
0 answers
32 views

Trouble compiling PHP with MySQL on Linux: MySQL installation can not be found

I'm upgrading a terribly old application using PHP 7.3 and MySQL 5.5 on RHEL 7. I have to build both PHP and MySQL from source in order to put them both in custom locations. The problem is that when I ...
DysonC's user avatar
  • 25
1 vote
1 answer
41 views

PHP sql query not working to replace update all rows

Trying to update table rows for a specific state_id the insert works but with an error, it doesnt use the right city_name .... So this is what we tried and remember we are still learning PHP so any ...
Skipper's user avatar
  • 41
-2 votes
1 answer
48 views

Fill textareas on HTML load with data from SQL database via PHP [closed]

I am asking for your help with HTML, JavaScript, jQuery, ajax, PHP and MySQL. Sadly, I am unable to provide any codes (but one) because I have none that actually works. Because I am no coder, it's ...
smithmarci's user avatar
0 votes
0 answers
47 views

I wanan add function here for Half Day Leave as Stats

I have a dashboard on laravel and it has a area for attendance and half day leave so my previous to dev I set up environment. $employeeAttendance = new AttendanceEmployee(); $...
Imran Niaz's user avatar
-1 votes
0 answers
20 views

SQL to split the column value based on a character and check whether the split value contains a specific character

For example, AAA-BBB-CCC-DqDD I want to split it to AAA, BBB, CCC and DqDD and to check weather any split value contains "q" How can I check it using SQL query
user2147570's user avatar
0 votes
0 answers
12 views

mySql Group_Concat versus iterating results for pagination

I am wondering whether it would be faster to use Group_Concat or simple fetch iteration to get a list of results (perhaps a couple thousand) in order to save the result IDs for pagination through the ...
Ben Cahan's user avatar
0 votes
0 answers
57 views

#2002 - Connection timed out The server is not responding (or the local server's socket is not correctly configured)

I'm trying to make a MySQL & phpMyAdmin on Replit but there is an error when I'm trying to connect to it from Node.JS, phpMyAdmin.co or any another host and the error "#2002 - Connection ...
Àbu Màher's user avatar
1 vote
0 answers
20 views

LOCAL INFILE ERROR: but as of v2.0 you must provide streamFactory option returning ReadStream

I wanted to upload a csv file using SQL commands but I got this error. As a result of LOCAL INFILE command server wants to read yob2019.csv file, but as of v2.0 you must provide streamFactory option ...
Ziongeek's user avatar
0 votes
0 answers
36 views

PHP: Trying to login into my page If my password is valid with what password have in database

I actually trying to login into my page using password give through URL. And another thing is I want to get data what database stored(Like username) to get and set for my output. At the time got ...
Klinton A's user avatar
1 vote
1 answer
37 views

Adding an input button in table cell with php/mysql

I have a table with some cells populating data from mysql, then I want to add a push button to change stuff for a particular row (providing parameter as hidden input for change.html so they get passed ...
user152400's user avatar
1 vote
2 answers
45 views

PHP: Fetch users table to Auth table using foreign from the database [closed]

I try to get users data and fetch to Auth database table data from the database. This whole thing happened RDBMS. In this case I got some errors. When I write this code I got some errors but I could ...
Klinton A's user avatar
0 votes
0 answers
21 views

upload a blob to mysql from imagecreatefromjpeg

Good afternoon everyone, I am trying to upload an image created with the imagecreatefromjpeg command from php, through mysql, but I am not able to. my current code is this: $estampa = ...
dsancram's user avatar
-1 votes
3 answers
65 views

Facing some issues to inserting data in sql, Some text is with inverted commas like text's [duplicate]

Here is my array for JSON I am trying to creating a JSON array with this code and then inserting the data in my sql but it is not working with inverted comma like "The text is with inverted comma'...
Amir's user avatar
  • 29
-1 votes
1 answer
31 views

Data not displaying in woocommerce website

I have two environments 1. test and 2. live. Its a WordPress website with woo commerce. There are some data not displayed in live environment while all data is displayed accurately in test environment....
Raj's user avatar
  • 1
0 votes
1 answer
108 views

Procedural MySQL Improved Driver Class File For PHP 8.2 -- Stack Trace Errors From Queries and Does NOT Work

Procedural MySQL Improved Driver Class File For PHP 8.2 -- Stack Trace Errors From Queries and Does NOT Work I have written a Procedural to Object-Oriented MySQL Improved Driver Class File For PHP 8.2....
Gcnord1008's user avatar
0 votes
0 answers
27 views

connecting my google cloud sql database, to my hosted php app

i am runnning a project where my php app hets an http request, and then it updates that value in my google cloud sql database. i tried connecting using the public ip, but i meet the same error. <?...
Hamzah Faleel's user avatar
0 votes
1 answer
42 views

Bind Param - Multi Value Data - VarChar

I'm trying to learn about prepared statements and bind param. Code from pHp manual What I'm looking at specifically is the following code: mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); $...
Antonio's user avatar
  • 43
0 votes
1 answer
25 views

Connection lost: The server closed the connection (PROTOCOL_CONNECTION_LOST)

I'm currently working with serverless architecture using Lambda Node 16.X version, and I've encountered the following error. Is there anyone who can assist me in resolving this issue? { "...
Aasai priyan's user avatar
0 votes
1 answer
45 views

What am I doing wrong? (php: connecting to database with mysqli)

Im trying to verify if I have connected to a database however whenever I check if the connection fails with an incorrect password, i get no response back on the page <?php include 'SETTINGS.php'; ...
Sam Roberts's user avatar
-2 votes
2 answers
43 views

upload file directly from html-form to mariadb table, in a LONGBLOB column, with php [duplicate]

I try to upload a file from html-form in my mariadb database booksummerytable. I get an db entry in the table, in columns student_id and a book_id, but the file-entry just do not want pass in the ...
Ro Man's user avatar
  • 3
0 votes
0 answers
48 views

Mysqli with PHP: How to access stored results [duplicate]

I have a prepared and bound SELECT statement that, when executed, returns a single row: $statement = $mysqli->prepare($sql); $statement->bind_param('s', $id); $statement->execute(); ...
rayvd's user avatar
  • 121

1
2 3 4 5
499