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
6
votes
1answer
70 views

All-core MediaWiki website upgrade script

I wrote the following Bash script to upgrade All-core MediaWiki websites (no added extensions/skins or images - besides logo image). I already tested the essence of this script and it worked for me; ...
3
votes
2answers
84 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 ...
4
votes
3answers
783 views

Is my login system secure?

I am recently making a CMS and I need a secure login system, so this is my code. How is it? First: the HTMLcode for signup and login: ...
7
votes
2answers
1k views

Generate SQL query by loop

I need to perform SQL query which will get products from database based on few dimensions which I will pass in URL. ...
1
vote
1answer
1k views

Scrape google apps page and store application details in database

Below is a python script which scrapes specific google apps url for example https://play.google.com/store/apps/details?id=com.mojang.minecraftpe and save the ...
1
vote
1answer
62 views

Connect to database, handling errors

I try to handle or catch possible errors with PHP/MySQL for security reasons and would like to know if I'm doing it right. The first case, connection: I use it as a function and call it always when ...
1
vote
1answer
53 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: ...
1
vote
1answer
55 views

Code improvement suggestions for cost calculation [closed]

I have to calculate costs based on country code and city(optional). There is also a condition that countries in Asia have separate pricing logic depending on both country and city and they are stored ...
1
vote
1answer
1k views

Separate areacode from phone number string with MySQL Database

I have a database with 5000 entries of local area codes to separate the area code from a phone number string. I'm not sure if the code I use is the fastest way to solve these job. I shrink the ...
7
votes
1answer
54 views

Database design for a very basic image-sharing social website

Below is the database design that I created for a basic image sharing social website. When a user signup his username, email, password save in users When the user ...
3
votes
1answer
36 views

Import Excel sheet into MySQL

This is the first project I have coded using Python. Therefore, I am looking for someone to give me some comments to further improve my code. Purpose of the application This application help the ...
6
votes
1answer
2k views

Fastest way to insert rows in mysql vs sqlserver (large dataset)

I'm looking for any possible improvements that could be made to run the mysql piece of code faster. I created a simple test winform application that creates two docker databases : Sqlserver on linux ...
1
vote
1answer
44 views

Simple CRUD back-end for an inventory-tracking web API

This is the simple back-end, albeit crude, that I made for a React Native mobile app project as a proof of concept. It's a basic CRUD for tracking supply inventory. The "shopping list" is items with a ...
5
votes
2answers
8k views

Better multithreading with network IO and database queries

I'm writing a script that: fetch a list of urls from a db (about 10000 urls) download all the pages and insert them into the db parse the code if(some condition) do other inserts into the db I have ...
2
votes
1answer
64 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 ...
1
vote
0answers
36 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 ...
5
votes
4answers
210 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
45 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 ...
1
vote
1answer
32 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
72 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 ...
3
votes
1answer
23 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 ...
3
votes
1answer
28 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
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 ...
8
votes
2answers
131 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 ...
10
votes
1answer
217 views

Science Fiction Wall of Fame (Shame?)

I have a few of hobbies, one is reading science fiction and fantasy and another is coding solutions. I thought I might have a chance to combine both hobbies on this project. I have well over 1500 ...
0
votes
0answers
31 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
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 ...
1
vote
1answer
24 views

MySQL GROUP BY id, then show name

I have a users table where some users have the same name: ...
2
votes
1answer
67 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
0
votes
0answers
16 views

Dynamic Statement Evaluator

I've written a stored procedure in order to simplify the process of calling dynamically constructed MySQL statements: Implementation ...
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 ...
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
1answer
25 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 ...
3
votes
2answers
77 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
58 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 ...
3
votes
2answers
7k views

PHP Check user and delete if expired

Currenty coding a PHP script that will have a CRON to auto run it. The point is that it checks the user in Mysql and if it has expired, it will delete it from the admin table and set status to expired....
4
votes
3answers
3k views

A class which represents an SQL table

I'm representing DB tables as classes (in this case PHP classes). This has the goal of modeling every section of the web page, where you will get inputs from the user. My actual base design is: One ...
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
18 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 ...
3
votes
1answer
9k views

Basic object-oriented PHP login, logout, and registration scripts

I am new to OOP in general and have recently started trying to develop object-oriented PHP code instead of relying on a primarily procedural style, as this is a requirement for my studies. One part of ...
2
votes
0answers
54 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 ...
2
votes
1answer
68 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 ...
4
votes
1answer
90 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 ...
51
votes
2answers
58k views

Class for reducing development time

There are many PHP PDO classes out there, agreed. However I find they do not allow for flexibility. So I created one that helps reduce development time as little as it may be but it does the job (...
1
vote
1answer
1k views

Class to create dynamic php + mysql queries (safely)

I've started to learn PHP classes, interfaces, extends and things related to those. Before this i've worked only with functions and it started to be quite a mess with hundreads of separate functions. ...
5
votes
1answer
7k views

MySQL data fetching without page refresh

I've recently finished a prototype for a little Raspberry Pi website. The main page of the site displays current users found in the room (through bluetooth). I wanted this list updated regularly from ...
5
votes
1answer
88 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, ...