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
1
vote
0answers
31 views

Web application with user privileges and role feature [on hold]

I'm building a web application with CodeIgniter which manage the following roles: Super Administrator Administrator Operator Customer Each role have a default list of privileges, eg: ...
5
votes
4answers
203 views

Java methods to add and authenticate users in MySQL

I'm going through some code and trying to figure out how to get rid of duplicates from the following two methods. Both methods execute a simple login/register query to a local MySQL DB. I couldnt ...
1
vote
1answer
29 views

Create, populate, and query a basic five table car dealership database

The objective is to implement basic mySQL and relational principles, like how to handle and query one-to-many and many-to-many relationships. The database consists of 5 tables: car (car_id, ...
2
votes
1answer
65 views

PHP santization of textarea input

My application will accept textarea content that is submitted by a user, and i would like some people to review my code to make sure there is no security vulnerability such as XSS. My mySQL column ...
1
vote
0answers
35 views

Optimizing Node MySQL Query for CPU Utilization

I am working on a NodeJS port listener code that listens to a particular TCP port on the server. The obtaining the data from the port, the data is split using a delimited (for instance comma ...
1
vote
1answer
50 views

Shoutbox system

I wrote a little Shoutbox System which is working fine, but I want to know if there is something I can improve about this code. Here is my Shoutbox Overlay: ...
3
votes
1answer
24 views

Building CanvasJS Graph Datapoints in PHP Loop (MySQL Backend)

The following code is one of a few similar snippets that generate a graph using CanvasJS, with the datapoints for the graph pushed to an array in PHP during a while loop. The code pulls the the date ...
2
votes
1answer
39 views

Python Tkinter login GUI with database

I created a simple login program that works how I wanted them to work. I separated the GUI and database codes into two different python files. I named the files as login.py and dbaseManip.py. The ...
0
votes
0answers
28 views

Python script to import MySQL tables to PostgreSQL

I'm using the below Python script to port few table data from a remote server (MySQL database) to my data warehouse server (PostgreSQL DB), The script is working fine (I'm using foreign data wrapper), ...
1
vote
1answer
44 views

Dynamically inserting html from external file and updating the database

I need some suggestions on how to approach this. I want to allow users to create sections of website. The code so far is working but since I am new to back-end I feel like there is better, more ...
2
votes
1answer
66 views

Join and pivot multiple tables of securities data in MySQL

I'm interested in a way to join three (or more) tables in a way that is more efficient (both in terms of conciseness of code and in terms of generating the results) than what I have currently. ...
4
votes
2answers
112 views
1
vote
1answer
24 views

MySQL GROUP BY id, then show name

I have a users table where some users have the same name: ...
1
vote
0answers
25 views

Stored procs fine tuning for processing bulk data - 5 million records

I have this procedure which is used for bulk upload data from a temporary table (temp_rules_master) into two other related tables. It has 5 million records. The ...
0
votes
1answer
19 views

Querying nearest city with a given shop using latitude and longitude is slow

I am using the following query to search for the nearest city to my location from the cities table using latitude and longitude. The query also checks whether the nearest cities to my location have ...
3
votes
1answer
24 views

Billing and recurrent payment db structure

I am designing my first payment service and here is my db structure. Each user can have many businesses, each business can have many products. Some are recurring, some are paid once. Each product is ...
6
votes
3answers
267 views

Single method for different parameterized mysql command

I currently have these two methods. One method returns all records, while the other one returns only a specific record. ...
3
votes
2answers
75 views

Elegant and secure way to create a dynamic query

I want to create a dynamic query to display: all the invoices if the user has moderator rank only his invoices if the user is a simple member code ...
0
votes
1answer
53 views

Register Script for a website [closed]

I'm still new in web development and I am trying to develop a website with free access to doctors listing with option of booking. This is a personal project that my local community can benefit. I ...
1
vote
1answer
55 views

Displaying a paginated list of forum topics using PHP PDO [closed]

Can someone tell me if this code is safe? Can be sql-injected or something else hacked? Code get some rows from db and show in pages with pagination... if i can improve let me know and show me how, ...
2
votes
0answers
17 views

Querying Aurora via Node.js

Function queries data from an Aurora database. Aurora database is the MySQL engine therefore, I'm querying it with a MySQL NPM module. If there is something better, I'm all ears. The calling function ...
2
votes
0answers
53 views

Make Pagination using Ajax with Jquery, PHP [closed]

This is the first time that I have add (I mean, I try) Ajax with Jquery to PHP and Mysql (pagination). This is a link to the test page: testpage1 I think everything works, but is it done correctly? ...
3
votes
1answer
49 views

Proper use of mysqli->close();

database.config.php ...
3
votes
1answer
20 views

Reviewing the Dockerfile and docker-compose.yml files for a basic nodejs mysql project

I'm new to docker and after much research and stufy I've created a sample application and would like it to be reviewed in case if I'm missing any corner or if there's redundant information that can be ...
4
votes
1answer
89 views

PHP Login Class - Security and Efficiency Check

I'm hoping someone would be able to identify if my code is prone to SQL injections, and just overall see if there is anything that could be done better, faster or more efficiently Im very new to OOP ...
2
votes
1answer
66 views

PDO library to handle MySQL queries

This is my library class. This does not have any issues but I want to know if I have any mistakes, or ways to improve performance: variable and call (example of ...
2
votes
1answer
63 views

Php registration form input is required validation

Ok, so I have been looking for resources on how to make a registration form work with input validation. I want the error message show up under the table of the registration form and not on top of the ...
5
votes
1answer
87 views

Lastest version of my Blackjack game

This is the latest version of my Blackjack game that uses a MySQL database to store user info. I did everything I was recommended in my previous post, added a ranking system and also fixed a bug where ...
1
vote
1answer
54 views

Search by parameters from multiple tables

I wrote a query that searches people based on search parameters from 3 other tables (phones, ...
0
votes
1answer
41 views

Saving row versions in MySQL [closed]

I just want to confirm that I am versioning my "versionable" fields correctly, and that there isn't another, better way to do this. I have a table event, a record ...
1
vote
0answers
24 views

performing SQL SELECT query inside the loop [closed]

I have a table leave_muster inside which I have to update all the records of the previous month on every start of the new month. My Code ...
0
votes
0answers
24 views

Ensuring referential integrity in child, group relationship

I'm not going to lie - Sql Server is not in the top 10 of my skill set, but it's something that I have to do from time to time. What's more, I'm using Entity Framework, so there is a workaround ...
2
votes
1answer
102 views

Create Apache2 virtualhost, Mysql db & user. CLI tool and GUI on top of it

Review for optimization, code standards, missed validation. What's in this version: Rewritten, instead of large complex script - few tools with each own task. Solid CLI tool and GUI script on top of ...
2
votes
1answer
99 views

PHP Mad Libs with OOP and SQL

I've been learning PHP and I've just gotten into using OOP. Classes/objects/methods etc. My end goal is to take an old Mad libs program I did with PHP, and convert it to OOP. The gist of the project ...
0
votes
0answers
15 views

Optimize slow SQL stored procedure that calculate Test Case failures in a non-optimal schema

I need to heavily optimize the following sql stored procedure (MySQL 5.6). Requirements: Should be as fast as possible (this is a key) Lots of records (10 M now, possibly more) Stored procedure ...
3
votes
1answer
70 views

Blackjack game with database - follow-up

This is a follow-up to my ex-posted Blackjack game that uses a MySQL database to store the accounts and user's money. I tried splitting display_info() a bit, I also ...
1
vote
0answers
29 views

Retrieving information about a vendor using MySQL

I am loading some information about the selected vendor using mysql query. I made a method with a List as return type, then created another method to assign values coming from a list. I am wondering ...
4
votes
1answer
93 views

Blackjack game with database

This is the latest version of my Blackjack game and I did a quite big update to it. Now you can make an account that is saved in the MySQL database and you can bet money that are also saved in the ...
4
votes
1answer
79 views

Registration and login script

This is a registration and login script I have made in Python 3. It uses a MySQL database. In the future I might use it with my Blackjack game and add a row called ...
3
votes
2answers
175 views

PHP Secure Login Scripts

I have created this login script for a website I'm making; basically I want to make it as secure as possible, but also I want it to keep users logged in for 30 minutes. For example if I've logged in ...
5
votes
2answers
133 views

Web scraper for football data with three very similar methods

Application Logic I wrote a web scraper that store some football data inside my database. Those data need to be update if 7 days are passed since the last update. I have three types of record: Team ...
1
vote
0answers
44 views

Writing SQL queries to retrieve data from given tables

Good day, I am a college student and lately we had an assignment where we were tasked to write SQL commands on various questions depending on the information that is needed to be displayed from 3 ...
8
votes
2answers
128 views

Non-Entity framework database interaction model

A C# WPF user interface has been developed for the Book Inventory MySQL database previously shown in this question. Since the database had already been developed this was a database first ...
2
votes
0answers
27 views

Insert data from one table to another (million+ rows)

I have a procedure that collects data from one table and inserts it into another table with the same columns, but after correlating with a few other tables. Since the existing table (from which data ...
2
votes
1answer
63 views

Optimize Multiple Insert SQLite Coming From MySQL

I'm currently developing an app that requires sending and receiving of data from android studio going to MySQL and then data coming from MySQL will be saved from the SQLite. I need advice on how to ...
3
votes
1answer
75 views

Sending and receiving of JSON data to and from Android Studio

I'm currently developing an app that requires sending and receiving of data from android studio going to MySQL and then data coming from MySQL will be saved from the SQLite. I need advice on how to ...
1
vote
0answers
76 views

Consumer Producer problem solution using JDBI, MySQL, HikariCP

The app suppose to solve a subset of Producer–consumer problem. One producer, one consumer thread and buffer. The idea of the app to handle correctly database downtimes. The solution is to keep ...
3
votes
0answers
49 views

MySQL JSON diff procedure

I'm building a procedure which compares two JSON objects and return two JSON objects with differences between each (compared keys and values). But I have relatively superficial SQL knowledge, so I ...
1
vote
1answer
116 views

Using encryption/hashing to create a secure login

I am creating a login for an encrypted chat application which retrieves login information from a MySQL database. I have got to the point where I feel pretty confident that (to the best of my knowledge)...
1
vote
1answer
68 views

User registration and authentication using hashed passwords

I'm working on a game project (with Unity) that shall handle user credentials and other data. The game connects send requests to a php script and this script send requests to the database. After ...