Skip to main content

Questions tagged [mysqli]

The MySQLi extension, or as it is sometimes known, the MySQL Improved extension, was developed to take advantage of new features found in MySQL systems versions 4.1.3 and newer. The MySQLi extension is included with PHP versions 5 and later.

3 votes
1 answer
96 views

A function that returns correct number of inserted, updated and skipped rows for INSERT or UPDATE query

When MySQL executes a Data Modification Query, it provides some additional info on the outcome, which is usually displayed in the console. This info is also being exposed through MySQL C API and this ...
Your Common Sense's user avatar
5 votes
2 answers
310 views

A PHP class for the common database operations?

I'm a CS undergrad, so I don't have much experience. But while coding vanilla PHP projects, I found that I was repeating myself a lot with the CRUD operations. So overtime, I developed a single file ...
sammy medawar's user avatar
0 votes
1 answer
101 views

PHP login codes suggestions

Now i have a fully functional PHP codes for login and registeration i was wondering if anyone could offer improvements to the code The code: Config.php: ...
Bebo's user avatar
  • 47
0 votes
1 answer
211 views

Follow up to Validation Script in PHP

So I've implemented the suggestions in Original question And now my code looks like this: ...
Bebo's user avatar
  • 47
2 votes
1 answer
168 views

PHP Validation script

The code below is modified slightly from the code in this previous post. I believe the code below could be improved and more secured but i don't know how so someone please show me how an improved ...
Bebo's user avatar
  • 47
0 votes
1 answer
302 views

SQL & PHP login method

My code is working however it seems to be using old outdated php version so less secure and I'm still new to programming so I'd be more than thankful if someone shows me how an improved updated and ...
Bebo's user avatar
  • 47
3 votes
1 answer
266 views

PHP MySQLi Wrapper Class For API

I've never had my code reviewed before, so I am taking this opportunity to see what can be improved with my coding style. I am still somewhat "new" to PHP, in the sense that I'm an old dog ...
Bellator's user avatar
  • 131
4 votes
3 answers
425 views

Queries to get products selected in multiple stores

Project description I'm making a website listing products. The listing goes as following (See here): Product name Shop name Price in that shop If the product appears multiple times in the table for ...
Alpha.Ars's user avatar
4 votes
4 answers
585 views

Functions in PHP to run basic MySQL crud

I wrote a list of functions in PHP that I want to use in my pet project as an autoloaded file for all parts of the app. The purpose of these function is to shorten the code you write for MySQL queries ...
Syed M. Sannan's user avatar
4 votes
2 answers
3k views

using PHP and JS to fetch data for an entry

I need to fetch some data from a mysql database. For that I created get_data.php on the server and a js function to retrieve that data on the client. Is this the proper way to do it? What would you ...
Graziano Bolla's user avatar
5 votes
2 answers
327 views

OOP - Contact Form PHP Backend - Procedural to OOP - Dynamic MySQL Prepared Statement PHP

I just converted procedural code to OOP code. Is there any performance or security issue with this code or what should I consider further? interface ...
Thaninayagam's user avatar
3 votes
1 answer
981 views

MySQL database custom session handler using PHP with MySQLi extension

I have made the decision to move the storing of session data to the database. Any new ideas, suggestions are welcome. Please also give security suggestions. Like SQL injection is possible here, etc... ...
Puneet Gopinath's user avatar
2 votes
1 answer
64 views

Input text upload to MySQL DB

I am uploading and selecting code from my MySQL DB and I have a feeling some of it could be written in a much shorter way but I don't know how. Can someone tell me if this is clean code or if it's too ...
user13477176's user avatar
-2 votes
1 answer
252 views

Query builder class pdo,sql

Need some advices to create class that handles sql query operations with given array (having full control of the array and obtaining record information). My code works properly (it is just example), ...
Anarchy's user avatar
-1 votes
2 answers
160 views

My Script Inserts users into a database and hashes the password, I need to know how to prevent SQL injection with Procedural-Oriented MySQLi [closed]

My script works but I just want to know how I can protect myself from SQL injection with Procedural Oriented MySQLi. Most of the tutorials are about Object-Oriented MySQLi and I'm not familiar with it ...
Pal Dhillon's user avatar

15 30 50 per page
1
2 3 4 5
18