MySQL is an open-source, relational database management system. If your PHP code uses MySQLi, use the MySQLi tag instead.

learn more… | top users | synonyms

2
votes
0answers
12 views

Handling Queries with Custom Classes

Once a project gets bigger than a couple pages you don't want to have to call up every single page and do find & replace every time there's a change in the database structure. At least, I don't! ...
3
votes
1answer
45 views

Online examination portal for learning

I am new to ASP.NET and I just developed a simple online examination portal for learning. I used ADO.NET, MySQL and developed in VS 2010. I have a login page in which the user can login and register ...
4
votes
3answers
1k views

Game Permission System

I have just finished coding a permission system for my game server but one method in the class is seeming to be very complicated, and maybe some people on this site can help me improve the method? ...
-3
votes
1answer
17 views

Trying to do cross tabulation in SQL and have the data go by ascending order [on hold]

so I have been scratching my head for awhile as to how to go about doing this code. I was able to do cross tabulation in SQL, but the data is unordered and I want it to be ordered by ID, here is my ...
4
votes
0answers
264 views

MySQL client for my local database with login screen

This is my second project. I've wanted to create a little client for my local database, so I can get familiar with databases. I've created a client for one db table using JavaFX. I want to know what I ...
4
votes
2answers
47 views

Build a MySQL upsert query to insert/update multiple records in Python

I'm generating a multi-row insert/update with the MySQLdb/MySQL-python module from lists of data rows and field names. For reference, see the executemany() example in the docs. You can see some ...
3
votes
0answers
12 views

ThorsSQL Lib: Part 3: Layer 5 Request/Response

Have a working version of MySQL implementation of ThorsSQL library done. If you want to check it out you can find the whole thing on github ThorsSQL. This is a follow on to previous code Reviews: ...
3
votes
0answers
23 views

ThorsSQL Lib: Part 3: Layer 5 HandShake

Have a working version of MySQL implementation of ThorsSQL library done. If you want to check it out you can find the whole thing on github ThorsSQL. This is a follow on to previous code Reviews: ...
5
votes
1answer
52 views

MySQL Query to check at least one field is greater than zero

I want to retrieve the row if any of the 3 integer field in a row is greater than zero. All the field has default value of zero. Which of the following query is better? ...
3
votes
1answer
56 views

MySQL database library with multiple connections

I am writing this question to get some advice on improving this Database Management library. I'll explain a little about it: Database Manager - DatabaseManager is ...
5
votes
0answers
39 views

ThorsSQL Lib: Part 3: Layer 3

Have a working version of MySQL implementation of ThorsSQL library done. If you want to check it out you can find the whole thing on github ThorsSQL. This is a follow on to previous code Reviews: ...
3
votes
0answers
26 views

ThorsSQL Lib: Part 3: Layer 2

Have a working version of MySQL implementation of ThorsSQL library done. If you want to check it out you can find the whole thing on github ThorsSQL. This is a follow on to previous code Reviews: ...
-4
votes
0answers
15 views

Xampp:Php form with checkbox to Delete mysql records,Update cells anyway and Insert's 1 row [closed]

I created 2 pages: The first page: Retrieves data from compact_discs table and via checkbox can select and delete the corresponding row, I can alter any column,field except the 1st's column fields ...
10
votes
0answers
61 views

ThorsSQL Lib: Part 3: Layer 1

Have a working version of MySQL implementation of ThorsSQL library done. If you want to check it out you can find the whole thing on github ThorsSQL. This is a follow on to previous code Reviews: ...
0
votes
0answers
40 views

I want get percentage of student performance [closed]

Condition 1: I have three tables and I need a direct percentage of each student and each chapter. We have problems of that, Condition 2: I have another table that contains student percentage of each ...
0
votes
2answers
26 views

Paginated method to get all items

I'm using slim php and i have this simple paginated end point to get all clients, i feel like i could do some things here better, so i would appreciate all suggestions, if possible please give me code ...
4
votes
1answer
29 views

Counting penalties for each player by joining tables, where some of the data is null

I have a table full of player names: I also have a table full of player penalties: I have to list all of the players names, player numbers, and the number of penalties that they've incurred. To do ...
7
votes
1answer
53 views

Construct SQL query with a lot of parameters from configuration

I have implemented an interface through which one can select, update and remove items of the Account class in a MySQL database. For the three functions I'm ...
4
votes
1answer
23 views

Java JDBC: MySQL database-wrapper

I'm currently enrolled in a further education with the topic database administration. Among other chapters it contains how databases can be accessed from application-software. Because it lacks ...
5
votes
2answers
150 views

PHP MySQL PDO Database Class

Please let me know if any improvements could be made to my PHP PDO MySQL Class. ...
4
votes
2answers
88 views

Loading objects for users, roles, and groups from a query with LEFT OUTER JOINs

I have this function that returns me a list of users with their roles and groups. As you can see, this is how I fetch and create list of objects. I'm wondering whether this is a good approach and what ...
5
votes
2answers
55 views

Locking in MySQL stored procedure for deduplication

Multiple upstream servers are sending notifications to a load-balanced django app. If all the upstream servers are working correctly, the app will always receive duplicates of these notifications (...
1
vote
1answer
55 views

Round fractional seconds of MySQL Time

I've written a method to round a MySQL Time to two decimal places. Here's some examples: ...
3
votes
1answer
56 views

Java database query logic

I'm making a wrapper for querying the database so that I can more easily control the flow of database management and to make it easier for me to write data beans around my database. This code is ...
0
votes
1answer
55 views

Loading data, caching, and saving on dispose

I have just finished coding this class that will load all columns in a MySQL database in to a cached Dictionary<string, string> which will only be modified on ...
1
vote
1answer
72 views

Getting a connection to the database and executing statements

I've got two classes for getting a connection to the database and executing things, Class 'A' was made by me and Class 'B' was made by a colleague, we were wondering which one is better for use (...
2
votes
0answers
31 views

Code for sanitizing a string for input into MySQL queries

This code takes an input string, the string length, an output buffer, the maximum capacity of the buffer (in elements, not bytes) and returns true if sanitization succeeded; false otherwise. Is this ...
2
votes
2answers
84 views

CRUD operations for a patient database

My code performs CRUD operations in PHP using OOP and dynamic queries. How can I completely separate HTML tables from this code? Db.php ...
3
votes
3answers
110 views

An online store, being converted from procedural to OOP

I just start to learn OOP, and it's far more interesting than procedural style. I have a complete working online store written in procedural style. After realizing that my code is becoming very huge ...
1
vote
1answer
71 views

PHP MySQLI Wrapper - SqlObject

This is a PHP script I wrote it back in 2015 and have been updating it since. It is a MySQLI wrapper called SqlObject (class) that was originally created to be ...
3
votes
1answer
94 views

SQL database for a social network

I'm trying to create a mini social network mobile application kind of like Instagram and I'm not sure about my database organisation, it feels like something is missing, especially with the ...
3
votes
2answers
284 views

Simple class to access MySQL database

I have written this simple DBHelper class to access a MySQL database. I am rethrowing a more generic exception so that the client side can take some action like ...
2
votes
0answers
75 views

PHP tagging script

I have created this PHP script in Laravel. I have database table with items and in my app I can create tags with different regexes. If regex matches text in description or epoch. I will insert ...
2
votes
2answers
100 views

Creating a secure and efficient DB connection and queries (using one class)

Currently, I'm working with a PHP database connection class that is in one single file with a construct. Every time I need this connection, I instantiate the class and the construct creates the ...
-1
votes
1answer
46 views

Laravel - Grab id's from multiple relations and compare them to do some calculations afterwards

Please check out my code below. I know I might be asking a lot, but this is newbie code which I feel can be improved quite a lot. So far I haven't been able to get it "better", or "simpler". What ...
3
votes
0answers
19 views

Planning the tours of home care employees as a stored procedure

We had an assignment to create a database for a fictional nursing service. To get accustomed to stored procedures we should implement one of our own choice. I decided to try my hands at writing a ...
1
vote
1answer
60 views

SQL Insert Performance

I am using a DataTable and the MySqlAdapater to insert around 100 000 rows with around 40 columns to a MySQL database. I chose ...
1
vote
0answers
50 views

Python class to get products from MySQL

This class gets the products from a MySQL database. The code is not clean, so are there any tips on how to improve? ...
2
votes
1answer
112 views

OOP PHP for handling upvoting

kinda new to OOP, and I wanna know if i'm heading into the right direction. Also I should mention I'm not using AJAX AnswerVoteManager.php ...
1
vote
2answers
90 views

One object to handle all my database manipulation needs

I have created an object to handle all my database manipulation needs. Here is my object constructor and one of its functions: ...
1
vote
0answers
90 views

Email thousands of customers from a PHP form using a MySQLi query on a MySQL database

How can a large internet service provider email certain customers to warn them about an impending service interruption? I'm providing what I think is a reasonable solution, but I have not tested it. ...
4
votes
1answer
282 views

PHP, MySQL quiz application

I'm working on a quiz application for training purposes and I think I'm done with most of it. However, I'm not comfortable with what I've done: it seems to be complicated and unprofessional and I ...
0
votes
1answer
160 views

Event sourcing with Python

I've been studying the event sourcing pattern and trying to come up with a set of classes or minimal library I can share across projects. Below you can find the implementation of this main parts of ...
2
votes
0answers
17 views

MySQL Workbench RoR Migration Exporter

I created plugin for MySQL Workbench that allows you to export an ER Diagram to RoR migration files. I would like to know if any other developers appreciate it. export-rails-4-migrations_grt.py <...
1
vote
1answer
66 views

Moderation library

Here is a moderation library that I have coded and would like some help in improving the quality of my code. Most of the code is styled by rules of Resharper; Resharper has helped me out a lot with ...
3
votes
2answers
93 views

Player Permission System

I have coded a fully working permission system for my gaming emulator to determine permissions for users. What I really want to know is: Is my code standard good enough? Is the design of the class ...
5
votes
1answer
101 views

MySQL/CUPS PDF printer for STAR TSP100 ECO

This is my very first attempt at Python and whilst the script works perfectly, I'd like to see if I'm missing anything obvious or doing anything particularly stupid. I think this runs on Python 2.7, ...
2
votes
2answers
95 views

Method to Retrieve Data from a MySQL Database

I have a method that retrieves information relating to a Contact that was made between two Companies. I am looking to improve my code in any way and am intrigued in hearing any recommendations you may ...
0
votes
0answers
245 views

Insert data into Aurora DB from Kinesis Stream using Amazon Web Services Lambda Function

I have a python AWS lambda function that takes JSON records, checks them to see if they have required keys, and then inserts into MySQL db. The function gets invoked whenever a new record comes into ...
3
votes
3answers
210 views

Parameterized search query in C#

In the UI I have a single search text box into which users can type a query. The query will split the string and compare each word to each configured column in the database and return the matches. ...