Click here to Skip to main content
15,890,512 members
Everything / Database Development / MySQL

MySQL

MySQL

Great Reads

by Christoph Buenger
Describes PHP application development with the free Scavix Web Development Framework (Scavix-WDF).
by vic_ch2000
A nullable datetime column in .NET DataGrid with DateTimePicker.
by Peter Leow
Get your database to generate unique running IDs for your application
by SarmadAsghar
Building on My SQL Storage Engines and APIs to Conduct Complex Analysis Using SQL Query Language: Part 5

Latest Articles

by Zijian
Reusable codes for JWT security in business applications
by Frédéric -lefred- Descamps
How to install WordPress on Oracle Cloud Infrastructure (OCI) using always free tier
by Ștefan-Mihai MOGA
About the IntelliDisk app that uses many components published on CodeProject

All Articles

Sort by Updated

MySQL 

N 24 Apr 2024 by Golden Basim
MySQL Database contains huge data (more than 5Gb) and more than 300,000 of records in some table. Some Queries require to handle some of fields value before showing it to the user like this query : var pQuery = DB2.sales_main ...
N 20 Apr 2024 by Graeme_Grant
So the issue is the uniqueness of the key. Using a dynamic object is the cause of your issue. Each object is unique. This is easy to demonstrate. Create two instances of a class with the same values, then do a comparison. You will find that they...
U 20 Apr 2024 by Golden Basim
I need to get the latest purchases cost for every group based on Item , supplier, unit. and synchronization it to another location .. item 1, pack, Jone, ... item 1, pack, Mich, ... item 1, pack, Yasser, ... item 2, pack, Jone, ... item 2,...
17 Apr 2024 by Zijian
Reusable codes for JWT security in business applications
15 Apr 2024 by Piniyi
Hello, I'm looking for help to design a bash script to locally backup a MySQL database and copy it to a network share. Ideally a retention option of X day(s) would be welcome. I have no knowledge of computer language. Your help is sincerely...
14 Apr 2024 by Pete O'Hanlon
This is the type of question that you could probably get answered using something like ChatGPT or Google Gemini. You have the information you want in your question, so what you need to do is write a prompt that will give you a suitable answer....
14 Apr 2024 by OriginalGriff
This isn't a "code to order" website - I suggest that if you can't do it for yourself (and are unwilling to learn how) you try somewhere like Freelancer.com - but be aware: you get what you pay for. Pay peanuts, get monkeys.
12 Apr 2024 by Frédéric -lefred- Descamps
How to install WordPress on Oracle Cloud Infrastructure (OCI) using always free tier
22 Mar 2024 by Member 16228270
this works alright in MYSQL , provided data may be incomplete, but here's what i did hoping it would work for some project etc!! --- SELECT ds AS Dated, COUNT(job_id) AS job_review_counts, ROUND(COUNT(job_id)/(SUM(time_spent)/(60*60)),2) AS...
21 Feb 2024 by Raji Chandran
Fatal error: Uncaught mysqli_sql_exception: Table 'integral.students' doesn't exist in engine in C:\xampp\htdocs\bluehand\admin\students.php:148 Stack trace: #0 C:\xampp\htdocs\bluehand\admin\students.php(148): mysqli_query(Object(mysqli),...
20 Feb 2024 by OriginalGriff
Read the error message: it's very explicit: Error: Table 'integral.students' doesn't exist in engine We can't "solve" that, we have no idea which DB you are accessing or what tables it contains - and no way to access your system to find out! ...
20 Feb 2024 by Ștefan-Mihai MOGA
About the IntelliDisk app that uses many components published on CodeProject
23 Dec 2023 by OriginalGriff
DBNull is a special type: it represents an "empty value" in database nullable column. When you issue a SELECT request against the database any matching rows that contain an SQL NULL value is returned as an instance of the DBNull Class[^] ...
23 Dec 2023 by Member 13569959
I am Getting This Error Object cannot be cast from DBNull to other types. while opening connection in asp.net What I have tried: I have tried changing net driver From MYSQL Connector NET 8.0 to MYSQL Connector NET 8.2.0 but did not worked out....
19 Dec 2023 by Andre Oosthuizen
Your best and safest way is to make use of your session that you already declared in your 'button_clicked.php' page - Quote: Session variables works by storing user information to be used across multiple pages (e.g. username, course names, etc)....
18 Dec 2023 by Ojazy Moi
I have a dynamic button, when clicked (Course Outline), retrieves mysql db record ID and redirects to a page. I want it to fetch all data associated the clicked ID and display on same page though different course outlines. which is not working. ...
8 Dec 2023 by Dave Rave
Instead of developing everything from scratch why don't you use existing parser like Simple HTML DOM documentation[^] ? This one works very well and will save you hours of development. The rest is easy - the queue of links to process etc. I'd...
24 Nov 2023 by s.s.scriptties
I've made a PHP web crawler and then made a MySQL table called "dex" as in index, then I connected to the database through PDO and tweaked the code to "INSERT" websites that aren't already crawled into the table, "UPDATE" for websites that are...
22 Nov 2023 by adriancs
A quick walkthrough of manually installing MySQL on Windows without use of MySQL installer.
22 Nov 2023 by k5054
As presented, there are no issues with your schema, other than no Stadium table definition. In any case, a column with a Foreign Key constraint may have duplicate values. Check the schema for the WomensWCSchedule table and make sure you do not...
22 Nov 2023 by DosNecro
-- Values for the schedule of all matches that took place INSERT IGNORE INTO WomenWCSchedule (Bracket, Match_ID, Referee_ID, Team_1, Team_2, Date, Time, Stadium) VALUES ('Group Stage A', 'M01', 'R05', 'New Zealand', 'Norway', '2023-07-20',...
3 Nov 2023 by RogerJones
I'm creating a Windows Forms App (.NET Framework) and trying to connect to a MySQL Database on my LAN. The code I'm using is: private void button1_Click(object sender, EventArgs e) { connString = $"SERVER={server}; DATABASE={database}; ...
2 Nov 2023 by Stylus STYLUS
MYsql data reader if is null field c# If is null field need to be empty Date = rd.GetString("DATE"), this I have error if is empty What I have tried: koneksi.Open(); var rd = cmd.ExecuteReader(); users = new...
2 Nov 2023 by raddevus
check out the official answer at : https://stackoverflow.com/questions/74060289/mysqlconnection-open-system-invalidcastexception-object-cannot-be-cast-from-d[^] The gist of that is: "Change MySql.Data.MySqlClient to MySqlConnector and the...
1 Nov 2023 by Richard MacCutchan
If DATE is a nullable field then you need to test for that condition in your reading code. If the request for that field gives an error then you need to find out why. In either case you need to examine the content of your database, and also use...
15 Oct 2023 by Richard Deeming
The most likely cause is that your Constants.selectAllQuery query - which you haven't shown - is only returning a single column. Try executing that query in your database to see what results you get. You can either work around the problem by...
15 Oct 2023 by M Imran Ansari
The error System.IndexOutOfRangeException: 'Index was outside the bounds of the array.' indicates that you are trying to access an index in an array that does not exist. This is likely happening in the part of the code where you are accessing the...
15 Oct 2023 by Stylus STYLUS
Can't read data from database Xamarine Raed two field from database id and name Moble app Error System.IndexOutOfRangeException: 'Index was outside the bounds of the array.' Please some advice What I have tried: private async void...
11 Oct 2023 by Mishack Hananiahs
I having that same problem here..
9 Oct 2023 by Dave Kreskowiak
Typically, you don't supply the database engine installation with your app. You make it a prequisite for your software in the installation documentation and let the user choose where to install the server, or to use an existing server. Your...
8 Oct 2023 by Leona Ji Abengoza
If I used XAMPP for my MySQL database, is there a way that I could deploy my C# .NET application to another computer without requiring them to install XAMPP? What I have tried: I've tried deploying the application to another computer, it works...
6 Oct 2023 by Leona Ji Abengoza
I developed a C# .NET CRUD application through Visual Studio 2022. I would just like to know how can I setup an .exe file of it together with the database I created through xampp (MySQL). I have been working on this for weeks, but I can't seem to...
5 Oct 2023 by OriginalGriff
MySql is a server based DB system, and it requires an instance of MySql to be installed where the user can "get to it" - normally just somewhere on the same network segment. You can't just provide the app EXE and a DB file: the DB has to be...
2 Oct 2023 by HernanTech inc
I am trying to create a website that will allow visitors to sign up and login later using their username/email and password will create a user and store in an SQL table called users. So when they later choose to sign in, it will connect to a...
2 Oct 2023 by KHAN WEB DEVELOPER
Does anyone knows about Laravel inventory management system? I am sharing one link of video. Please check https://youtu.be/1rOVrp2HgWA?si=qxOdMSGnKiBpOhza. In this link when you move forward at time 10 minutes, he approves products. I do not know...
29 Sep 2023 by OriginalGriff
Quote: Richard Deeming : YouTube videos have a "comments" section. Use that to ask the author of the video to explain his code. This is absolutely the best advice we can give you with other people's code.Quote: KHAN WEB DEVELOPER : I have asked...
13 Sep 2023 by Gcobani Mkontwana
I have created a signup.php file as back end API, the problem now is how do I call this file on my flutter app(registration page)? I am getting cors issue. Maybe I am missing some steps. Please advice because I can't use locahost:port number as...
13 Sep 2023 by Chris Copeland
One possible solution would be to configure CORS by placing a .htaccess file in your PHP base directory and configure the CORS headers in there, as such: Header set Access-Control-Allow-Origin "*" Header set Access-Control-Allow-Headers "origin,...
12 Sep 2023 by MAHESH WAGHELA
I am trying to get value from HTML Form and utilised it in MySql Select Statement but it does not work in PHP file as below: Table Name eclogin My Table Structure id pwd 1001 mahesh My HTML File:
11 Sep 2023 by OriginalGriff
The reason it returns a count of zero is simple: there are no matching rows. That could be because it's the wrong table, the wrong DB, or (most likely) that the parameter value doesn't exactly match the cell content. Sop start with the debugger,...
4 Sep 2023 by OriginalGriff
See here: SQL Joins[^] and here: SQL Server UPDATE JOIN Explained By Practical Examples[^] It's quite possible that you will also need to use SQL GROUP BY Statement[^] to get the totals for each account.
4 Sep 2023 by Jose Zuniga 2023
Tengo una tabla llamada tbl_account la cual tiene las siguientes columnas Codes, Account, Debit y Credit Tengo otra tabla donde hago los registros llamada tbl_entry esta tabla tiene las sihuientes columnas id, recorddate, fk_account, Debit,...
28 Aug 2023 by Member 12652465
I have a task I've been trying to solve, to do update and insert query into different tables in one click of button. I did the code as below, the update side of the code performed ok, but the insert part could not insert to the table. How do I...
28 Aug 2023 by Andre Oosthuizen
At the top of your php page, add the following for error checking/debugging - ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); I have the added additional error checking for you which you should always...
27 Aug 2023 by Member 12652465
I have a task I've been trying to solve, to do update and insert query into different tables in one click of button. I did the code as below, the update side of the code performed ok, but the insert part could not insert to the table. How do I...
27 Jul 2023 by OriginalGriff
What it is saying is that the DataTable columns and the DataReader that you are loading it from do not match: the reader is providing a column called "Foo" and the table expects one called "Bar". We can't help you fix that: we have no access to...
27 Jul 2023 by Member 15993566
While connecting windows server to linux server UI page was connectint but while login it was dispalying usename&Password doesn't match . I debug the code it was not going inside page load objDataTable.Load(objReader); Database was correct and...
19 Jul 2023 by Dion Fitzgerald
$query = 'SELECT weight FROM append'; $statement = $db->prepare($query); $statement->execute(); $row_data = $statement->fetchAll(); // gets rows from database $total_rows = $statement->rowCount(); // counts how many rows found if ($total_rows >...
16 Jul 2023 by честь диарио онлайн
Hi, I am trying to design a website using php and phpmyadmin. This website is supposed to open without difficulty. The following code is part of the execution process of the project, I have errors in lines 6. Deprecated: __autoload() is...
16 Jul 2023 by Andre Oosthuizen
If you state that you tried but it "didn't work" is not helping as we do not know what did not help as we can not see what you have tried. If you would have Googled the new function - 'spl_autolaod_register you would have found the answer...
16 Jul 2023 by Chris Copeland
You're probably getting that warning because there's technically a function already called __autoload[^] defined within PHP. I don't think you can define a function with the same name, so PHP is probably getting confused and producing the...
16 Jul 2023 by OriginalGriff
Read the error message: it is pretty clear: Deprecated: __autoload() is deprecated, use spl_autoload_register() instead It even tells you exactly what you need to do to fix it!
14 Jul 2023 by Thang Đai
I am writing a search function from date to date. But when I click search it doesn't return any results and it doesn't give me any error. file handover.html
14 Jul 2023 by Andre Oosthuizen
There are a few issues you can check that might cause a no return on your date request. I have added comments in your code where you can check. I have also added the 'System.out.println' to debug all returned parameters in your controller, check...
13 Jul 2023 by OriginalGriff
On a more awake inspection, a few things occur: 1) The syntax of an INSERT command doesn't contain the SET keyword and requires parentheses: SQL INSERT INTO Statement[^] 2) Always list the fields you are INSERTing into: if you don't then SQL...
13 Jul 2023 by 22bears
I'm learning PHP and MySQL and im on my 2nd project, this time is a big one for me.. an e-commerce I'm working 24/7 on this and I get multiple errors and I google as much as possible and I slowly get things fixed, but now I'm stuck at this, i...
12 Jul 2023 by Gcobani Mkontwana
Hi Team I am bit struggling with some logic to implement when a user has to login after they have added their item on cart. So in order to continue to checkout page must login and continue and that item should be there. What I have tried: ?php...
12 Jul 2023 by OriginalGriff
While what Member 15627495 says will work, there are two things to remember: GDPR which requires you to get permission from the user to add cookies to his system, and that IP addresses are not unique to a particular computer or device - they are...
9 Jul 2023 by Andre Oosthuizen
I am not sure which version of PHP you are using but the error gives you the hint - Quote: Call to undefined function eregi() The erigi function has been removed since version 7.0.0 of PHP, if you are on a higher version, it will not recognise...
9 Jul 2023 by честь диарио онлайн
Hi, I'm a PHP beginner, I'm trying to design a website using php and phpmyadmin. This website is supposed to view all records in a database, delete and add records. The following code is to add a new record, I have errors on lines 46,53,57. and...
9 Jul 2023 by Patrice T
Look at toue code ".$err.""; } db_close(); } if($regok ==...
9 Jul 2023 by OriginalGriff
Please don't repost if your question does not appear immediately: all of these went to moderation and required a human being to review them for publication. In order to prevent you being kicked off as a spammer, both had to be accepted, and then...
9 Jul 2023 by OriginalGriff
You need to understand scope rules: PHP Variables Scope[^] When you first create a variable inside a code block (delimited by "{" and "}" it exists only while that code block is executing - when the code reaches the "}" it is deleted. So when...
7 Jul 2023 by Dave Kreskowiak
You're going to have to contact the people you bought this thing from. You don't have a database. It's pretty obvious what this error means: Quote: Unknown database 'shop_db'
7 Jul 2023 by Jay Jul2023
This is the error that's popping Fatal error: Uncaught mysqli_sql_exception: Unknown database 'shop_db' in C:\xampp\htdocs\honey-ecommarceshop\ecommarceshop\connection.php:2 Stack trace: #0...
5 Jul 2023 by Siavash.BRY
Hi I have a MySQL Server version: 8.0.31.0. Without any process, it stops automatically with the following error message. Faulting application name: mysqld.exe, version: 8.0.31.0, time stamp: 0x6320bd31 Faulting module name: mysqld.exe, version:...
5 Jul 2023 by Andre Oosthuizen
You can look into a few options - 1) Check your MySQL error logs in your MySql data folder for any errors - How to see log files in MySQL[^] 2) Check your Windows Event Viewer for any related system or application errors occurring around the...
4 Jul 2023 by OriginalGriff
This site isn't for tech support for MySql - it's a software development site, and this question has nothing to do with software dev. You'd be better off asking in a dedicated forum: https://forums.mysql.com/[^]
4 Jul 2023 by Andre Oosthuizen
The item will never show in your cart as you are checking if the user is logged in, if so, then add item to cart. You have however set the 'isLoggedIn' value to false which means that the function to update your cart will always be false as per...
3 Jul 2023 by Gcobani Mkontwana
I need some help, the problem i am facing when add to cart is called it must show that item to cart. The logic i have so far its not showing that meaning when i add to cart it not displaying that item to be added. What I have tried:
22 Jun 2023 by Member 8840306
I am new in data base phpmyadmin Here my query that is giving error ALTER TABLE students ADD CONSTRAINT fk_enrollment_student FOREIGN KEY (student_id) REFERENCES enrollments (student_id); Here are structure of my table table 1 table 2 table...
22 Jun 2023 by k5054
I think you have your relationship between students and enrollments backwards. As written, you are trying to construct a dependency for the students table on enrollments. I.E. every student must have one and only one enrollment. This...
17 Jun 2023 by FRS4002
I have this code in fliters.php: Categories
17 Jun 2023 by Andre Oosthuizen
Quote: What should I edit in the code above? You have shown no code that might lead to a URL rename so there is nothing to edit. Normally I will not assist with no effort shown but luckily I had a code piece on this from before... Make use of...
15 Jun 2023 by OriginalGriff
Check your query: $query=" SELECT `fname`,`lname`,`appointment_date`,`appointment_time`,`message`,`remark`,`status` FROM `appointments` INNER JOIN `patients` ON appointments.patientid= patients.id INNER JOIN doctors ON...
9 Jun 2023 by Member 15418280
I am trying to setup mysql entityframework edmx in visual studio 2019 . I have installed. MySQL.Data MySql.Data.Entity MySQL.Web but still in connect window not able to see mysql for visual studio What I have tried: I am trying to setup mysql...
8 Jun 2023 by Richard MacCutchan
See https://dev.mysql.com/doc/connector-net/en/connector-net-entityframework60.html[^]
8 Jun 2023 by mridul tandon 20BCA1474
report_mode = MYSQLI_REPORT_OFF; if(isset($_SESSION['log'])) { header('Location: welcome.php'); exit(); } else { if($_SERVER["REQUEST_METHOD"] == "POST") ...
8 Jun 2023 by Member 16024865
prepare('INSERT INTO "users" (username, email, firstname, lastname, password) VALUES (:username, :email, :firstname, :lastname, :password)'); $stmt->bindParam(':username', $username); $stmt->bindParam(':email', $email); ...
8 Jun 2023 by Andre Oosthuizen
In my answer below I have created a quick page with manually added php variables ($year1, $year2, and $year3 to the desired years (e.g., '2021', '2022', '2023')) to point you in the right direction. Each tab navigates using an unordered list...
1 Jun 2023 by Micah Ebohon
Having MSQL and ODBC connection string in one configuration file for your application
31 May 2023 by Tung Nguyen Jun2023
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.SqlClient; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using...
31 May 2023 by OriginalGriff
We have no idea what error that generates - and no access to your system or network to try and find out. So, it's going to be up to you. Fortunately, you have a tool available to you which will help you find out what is going on: the debugger....
30 May 2023 by Member 15418280
we want to convert our ms sql script to my sql because we want to support our application in my sql as well. how can we migrate entire ms sql script file so we can direct open in my sql and run without error. What I have tried: we tried to...
30 May 2023 by Dave Kreskowiak
You have to write new SQL Scripts to support MySQL. Microsoft uses a version of SQL called TSQL. The two SQL dialects are not the same and are not interchangeable. No, there is no conversion tool.
29 May 2023 by jekin77
ask prof. Google. SQL Syntax differences between MSSQL and MySQL[^]
24 May 2023 by Aya 2022
Hello. I am having hard time fixing my current code which requires to update both items I have in cart. (For example I have 2 items in my cart, then my code doesn't update its quantity if the both items isn't filled out) My desired output: May I...
18 May 2023 by Jeffersonballer
I am unable to login to my dashboard page with my query with PHP and Mysqli. any help will be appreciate, thanks. What I have tried: if(isset($_POST['email']) && isset($_POST['password'])){ $sql = "SELECT * FROM vendors WHERE...
18 May 2023 by Richard Deeming
Quote: $sql = "SELECT * FROM vendors WHERE vendor_email='$email' AND password='$password'"; Problem 1: Your code is vulnerable to SQL Injection[^]. NEVER use string concatenation/interpolation to build a SQL query. ALWAYS use a parameterized...
18 May 2023 by Member 15627495
if(isset($_POST['email']) && isset($_POST['password'])){ $sql = "SELECT * FROM vendors WHERE vendor_email='$email' AND password='$password'"; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) === 0 and...
8 May 2023 by Member 15418280
use test -- insert INSERT INTO cust VALUES ('hi'); -- fetch SELECT * FROM cust test is my database name cust is my table name have only 1 column varchar getting error code 1064 you have an error in syntax What I have tried: syntax is...
8 May 2023 by Member 10601191
Suggest you log out/in start a fresh session then start again, copy/paste the entire session if error(s) still persist. I've re-created a session attempting to mimic yours .... the log of that follows .... OS - linux mint 20.x mysql - version...
4 May 2023 by OriginalGriff
We can't access your database, and we don't know how you are issuing those commands: you could be using a DB Management tool or code in PHP, Python, C#, ... and that could be impacting on the problem you are seeing. Or it could just be that you...
3 May 2023 by Gcobani Mkontwana
Hi Team On my back end i am getting undefined key array email and password on line 18 and 19. Basically i am doing a session so once users are validated to login must be redirected to profile.php. But when debuggin from the form i get this...
3 May 2023 by Member 15627495
your 'data' field is an Array url: "login.php", data: {"email": email, "password": password}, success: function(response) { to get values in : $_POST[0][0] ; // email $_POST[0][1] ; // password /or, as it's an...