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
77 views

PHP to Edit a User

I was wondering whether someone would be able to have a look at my PHP code? It's script to edit a user. I'm currently learning PHP and would like some feedback on how well I am applying it. Do you ...
2
votes
0answers
61 views

Creating calendar - Speeding up PHP script

I'm working on a calendar for my office. Every people has his own column and there is a line for every day. There are some periodic date, where, for example, given people have to be working on the ...
4
votes
2answers
214 views

API for SQL queries with PHP PDO

I'm writing a very simple CRUD application, and I'm wondering if the way I'm using static methods throughout the code makes sense. I'd very much like to simplify ...
5
votes
1answer
111 views

function for PDO queries and return result - tested - any tips?

I write a function using PHP and MySQL, to get PDO connection, query and array of placeholders to execute query and return result. I test this function and it has good response when result for ...
1
vote
1answer
78 views

Repeated DB connection at max user connections

I am trying to create class with connect to mysql database. And if there is max number of connections I want to wait and try it again. I figured out, how it can works, but I am not sure, if its the ...
2
votes
0answers
71 views

Make Pagination using Ajax with Jquery, PHP, History.pushState()

Finally after a few months of searching and learning ajax with pagination php and History.pushState() I created ajax php pagination. Test page 1. Ajax(index.php) ...
4
votes
1answer
179 views

Is my structure of program readable?

Just looking for reviews to improve my coding and my structure of C#. It feels I probably have some unnecessary code that is not needed, been following some YouTube videos to accomplish some tasks. ...
2
votes
1answer
89 views

Is execution of sql in my php code safe?

So I have two PHP files that execute SQL code in them. It's a simple registration script and an account recover script. I want to know is my code safe from SQL exploits & other exploits? Here's ...
4
votes
1answer
45 views

Create a CSV from SQL Data and email as attachment using PHP

I put together some functions that allows a PHP script to send the SQL data obtained from user inputs on a website via an email attachment as a CSV file. It works perfectly and I have no issues with ...
2
votes
1answer
75 views

Wordpress Ajax Custom Query - High CPU LOAD

I'm developing a fully AJAX community WP theme that comes with a lot of custom queries. Everything is fine, there is no bug but recently but I had a few clients that have a huge database and my theme ...
3
votes
0answers
30 views

PowerShell Script to get data from Third Party API and insert into database

I have created a PowerShell script that will call a REST API and then for each node returned, add the data into a database table. This particular endpoint only returns ~600 records worth of data, ...
3
votes
0answers
54 views

Mysql PDO Wrapper that throws Unique Constraint Exception

The main reasoning behind this PDO wrapper, is that I find myself using unique constraints quite frequently in my designs, and I have ...
2
votes
0answers
34 views

C# MySQL library: How can I reduce bundling and abstraction?

I'm a teen developer who just does this as a hobby, but I still care about good practice even if I don't fully understand it. Two of the most used phrases when sharing the code of my C# MySQL library ...
0
votes
0answers
9 views

Tree design in db with same child twice and value store

I have a non-cyclic tree like the below sample representation. It has nodes and edges connecting them. The tree has the possibility of the same node connected multiple times to one parent. Like in the ...
1
vote
1answer
31 views

Possible improvement on join query

I have the following query which retrieve all those who have ordered a book_id n°10 and but never ordered the book with id n°1. http://sqlfiddle.com/#!9/1bb9e8/44 ...
-4
votes
2answers
69 views

Is this a good approach to replace mysqli_num_rows? [closed]

Is this a good approach to replace mysqli_num_rows? $db is a PDO instance. .. ...
3
votes
1answer
92 views

CRUD integration test, is it ok?

I want to test my CRUD operation to a MySql database (I use dapper as my ORM). This is what I wrote with ...
2
votes
0answers
175 views

Windows user form to fill data to be sent to MySQL database

I have created an application to send data to MySQL. On top of that, I am attaching a file and storing into a folder. Also, If trying to attach an excel sheet - another form opens, giving you the ...
2
votes
1answer
59 views

MYSQL select count two table left join

I have two table. I want count how many times a value is in other table. So the codice from table "sorgente" is different in table contatore, because I have the suffix 'BRANO-' before the ...
3
votes
1answer
53 views

Secure upload script

I am creating a social network that let's users upload a profile picture. I just want to know if this is a secure way of doing it. Thanks. ...
2
votes
1answer
36 views

NODE JS Unlink and delete MySQL data

Here is my revised code from my other review question Node JS delete multiple MySQL linked records and delete physical file Just would like to hear some reviews if I have the right logic. ...
8
votes
3answers
1k views

How secure is my PHP registration script?

I coded a registration form and was wondering if anyone could give me feedback on whether I'm lacking any major security mechanisms. I've done loads of reading around the topic and feel it should be ...
1
vote
1answer
52 views

C# easier ways to filter values in data-grid by month

Goal: My goal is to filter datagrid by selected month from dropdown options. January, February, March etc... I'd like to know if ...
4
votes
1answer
36 views

Correctly using promises with node-mysql

I have been trying to do a simple query and return the results with node-mysql however I had several problems. Originally I wrote it where there was no promise, but ...
2
votes
3answers
61 views

Receiving a user's registration submission and inserting row into database #2

I asked this question before and mickmackusa and Your Common Sense gave me some good answers. I went over them and made as much ...
1
vote
2answers
99 views

Receiving a user's registration submission and inserting row into database

I have improved my code since the last time asking for its review. I'd like to know if it is up to the current standards. ...
-3
votes
1answer
39 views

I am trying to save a string to a MYSQL table from a radiobutton in java/Android studio [closed]

I am trying to save a radiobutton string if it clicked. I am making a survey where I need to save a "yes" or "no" into a MYSQL table using volley. I am having a little trouble ...
2
votes
3answers
631 views

PHP + MySQL beginner, any tips appreciated on the approach

Any tips or review points are appreciated, I'm not much familiar with server-side web-dev (PHP) and DB. Few things of note: I see no reason to separate codebase into different files and bother with <...
2
votes
1answer
31 views

Periodic Table and Simulation of Elements

I've been working on my first real "project" and decided to make the periodic table that can simulate each atom after you press on it. I'm unsure if the code is good and can be used on my ...
2
votes
1answer
68 views

Securely connecting to my DB [closed]

Hello all I have a short question. Is this a good and secure way to connect to my DB ? ...
3
votes
2answers
350 views

messages.php file security and efficiency

I am creating a social network and I want to know how secure and clean this code is. I had to update it to prepared statements because I was following a tutorial and even though it was made in 2019 it ...
3
votes
1answer
125 views

Get future events from Pinnacle API

My program makes API requests to Pinnacle Sports to retrieve future events and saves them to the database. Questions: Do I manage the database resources correctly? It takes about 3 seconds to check ...
2
votes
1answer
44 views

Query to retrieve available stock

I have a query that outputs a list of products with some fields from other tables. That query works fine. Now, I'm attempting to retrieve the available stock for each product in that list. I'm not ...
1
vote
0answers
70 views

SQL transaction management in Node.js with MySQL: use the existing transaction or create a new one if none exists

I'm trying to implement a SQL transaction management in Node.js, that would append queries to an existing transaction if available, or create a new one if none exists yet, thanks to an optional ...
4
votes
2answers
168 views

Security of post submission, picture upload and post fetch

I am a newbie and have been following a tutorial I bought on Udemy. But I was told it is old and teaches bad code practices. I used this in some code from my old projects. Now I'd like to know how ...
2
votes
1answer
96 views

Does this PDO process look protected from SQL injection?

Does this process look protected from SQL injection attacks? Is there something I could possibly change to make it more protected? ...
1
vote
1answer
57 views

Reduce database touches for one to many data pull

I have the following function which works properly and grabs all of the rows from a specific table, then loops through each row to add data related to it as a subarray. ...
3
votes
2answers
64 views

Getting data from database through Ajax post request

Is the method used below to get data from a database efficient and optimal? The data is in a MySQL database, and in my server I have a PHP file with the following code to return some information: <...
0
votes
1answer
43 views

Scrape page and send user only new results

Review Wanted Application Summary The application is a simple screen scraper which is to notify the user when new items are posted. The code is run as a CRON job every ten minutes. It will scrape the ...
2
votes
0answers
67 views

Junior Dev Self-taught Resume Project

I've been learning Python now for 3 months as I find it really interesting to code. I want to be able to apply for junior dev positions and as I have no formal education I thought I'd make a project ...
2
votes
0answers
41 views

Basic flask template with sessions

This Flask app, which makes use of SQLAlchemy, a MySQL server which is only reachable via SSH and Flask-Login, is the base on which I want to write an application which has login protected pages. ...
2
votes
0answers
6 views

Shorten Query Retrieving Time Attendance Data

I have a code, which does the following: Get data from the HrAttLogs Table Input data from the HrAttLogs Table to the ...
2
votes
2answers
68 views

Receive data from SQL and CSV and send it to MySQL database using Python

Details: I have a code, which does the following: Get data from CSV and insert it into MySQL table Get data from SQL Server and insert it into MySQL table Run this code every 240 seconds - to ...
0
votes
0answers
14 views

Data Integrity Through Custom Variable

In a mysql db environment there's not really a custom global variable option. One may need that for example a certain date, in order to perhaps merge two sources of data: one legacy, and one current ...
0
votes
0answers
36 views

Report writing, do the formatting work on database or non-database language?

When report writing, sometimes getting the data you need can be quite straightforward in SQL, but getting the data in the exact format you'll need it in for the specific report can be quite tricky. It'...
2
votes
1answer
45 views

Extract users and privileges from MariaDB and MySQL

This was born out of a need to create database users on a new server to allow views to be created correctly when restoring databases. This is designed to be run from a command line NOT via a web ...
3
votes
1answer
307 views

Add post to favorite in PDO and mysql

After lot of research and couple of questions in https://stackoverflow.com/ i managed to create Favorite System in PDO mysql as ...
0
votes
1answer
66 views

Fetch and add data to MySql [closed]

Here is my very first code which fetch data and add it to MySql. Please review my code and let me know if I'm on the right path. Is there anything I can improve? postsData class = fetch and add data ...
1
vote
1answer
72 views

C# MySQL connection and some queries

Goal: I am trying to get the hang of using MySQL connections within C# windows forms. These are such areas I am targeting: Loading dataGridView correctly Refresh dataGridView from an external form (...
1
vote
0answers
42 views

C# MySQL Database insert list of components

I am writing a function to have insert a list of strings into a MySQL database and C#. The process of creating the list of Components: User has to scan multiple barcodes and have them stored in a ...

1
2 3 4 5
22