Questions tagged [mysql]
MySQL is an open-source, relational database management system. If your PHP code uses MySQLi, use the MySQLi tag instead.
1,085 questions
4
votes
2
answers
464
views
Improving upon the Security of my Export Remote Database to Local PHP API
I am working on an in-house application, and I am working on how our application communicates with our remote server.
I have a PHP script that acts as an API to call to our MySQL DB and dump its ...
5
votes
4
answers
2k
views
Program for an employee database using python
In this program I'm defining functions to perform different tasks on a data record book for employees.
Here is a summary of the code:
Intro() to make the presentation of the home page.
create_record()...
0
votes
0
answers
63
views
Connection pool design for Boost MySQL
I had to design a connection pool that handles Boost MySQL connection to use the asynchronous functions.
Here is the code:
...
3
votes
1
answer
136
views
Faster Query to Track State changes in a Large Table
I have a table that tracks state changes of an entity with timestamps. The schema of the table is as follows:
entityid
userid
originalvalue
newvalue
changetime
255
101
Draft
Submitted
2023-11-28 12:10:...
4
votes
1
answer
125
views
Evaluating Extended Operating Hours Past Midnight Across Timezones in PHP
I am working on a project that involves tracking the operating hours of businesses across different timezones. Some of these businesses operate past midnight, and to accommodate this, operating hours ...
2
votes
1
answer
250
views
MySQL interval search query suggestions
My database structure is:
...
8
votes
3
answers
1k
views
A simple PHP login form with PDO
I wrote a simple PHP login form for a website. It has an initialization script, as well as a form to allow a user to login, plus a link to log the user out after logging in.
...
3
votes
1
answer
117
views
Consuming sharded database using node.js
I think the only big improvement that can be made is to check which shard to query based on the userIds of the followed users. One easy way is to check the last ...
3
votes
1
answer
99
views
SQL query creating tables needed by a simple PHP CMS
I have written recently the SQL query to MariaDB that I want to move into PHP code. Below is my test.sql file. What do you think about my SQL code?
...
2
votes
1
answer
93
views
delete rows based on references to other tables in a mysql database?
I have a database with the following hierarchy.
A dataset can have multiple scans (foreign key scan.id_dataset -> dataset.id)
A scan can have multiple labels (<...
1
vote
1
answer
121
views
mySQL adjacency list model : Always retrieve parent and children/siblings
I’m using mySQL to create and adjacency list model type of table. I have only one level, that is a parent with children, like this:
...
0
votes
1
answer
83
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
153
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
139
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
244
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 ...