Skip to main content

Questions tagged [mysql]

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

Filter by
Sorted by
Tagged with
2 votes
1 answer
45 views

Cmake build system for prototype planner software using boost and other previously written code

I'm prototyping/debugging some C++ code that I may turn into a longtime project. The build system is ready for review, the prototype is not. The GitHub repository for the code listed below. Like all ...
pacmaninbw's user avatar
  • 26k
6 votes
2 answers
691 views

Weather Observation Station 8 query

Here's my (correct) solution to a HackerRank question: Weather Observation Station 8 Query the list of CITY names from STATION which have vowels (i.e., a, e, i, o, and u) as both their first and last ...
JTB's user avatar
  • 277
3 votes
1 answer
74 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
3 answers
1k views

Slow SQL query with nested subquery

I have written the below query in order to identify how many events (occur over a week) in each hour. ...
Danny Goodall's user avatar
4 votes
2 answers
476 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 ...
Cory Green's user avatar
6 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()...
Abhisikta Ray's user avatar
0 votes
0 answers
67 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: ...
Reda's user avatar
  • 31
3 votes
1 answer
137 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:...
Fatal Error's user avatar
4 votes
1 answer
133 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 ...
tony's user avatar
  • 403
2 votes
1 answer
256 views

MySQL interval search query suggestions

My database structure is: ...
friday-json's user avatar
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. ...
whiteman808's user avatar
3 votes
1 answer
119 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 ...
user avatar
3 votes
1 answer
104 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? ...
whiteman808's user avatar
2 votes
1 answer
96 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 (<...
Roland Deschain's user avatar
1 vote
1 answer
123 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: ...
Marco's user avatar
  • 239

15 30 50 per page
1
2 3 4 5
73