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.
257 questions
3
votes
1
answer
88
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 ...
5
votes
2
answers
294
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 ...
0
votes
1
answer
94
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:
...
0
votes
1
answer
185
views
Follow up to Validation Script in PHP
So I've implemented the suggestions in Original question
And now my code looks like this:
...
2
votes
1
answer
154
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 ...
0
votes
1
answer
276
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 ...
3
votes
1
answer
262
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 ...
4
votes
3
answers
423
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 ...
4
votes
4
answers
558
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 ...
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 ...
5
votes
2
answers
318
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
...
3
votes
1
answer
967
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...
...
2
votes
1
answer
62
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 ...
-2
votes
1
answer
249
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), ...
-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 ...