MySQL is an open-source, relational database management system.
0
votes
0answers
11 views
Make a drop-down HTML using PHP from mql Database
I m trying to make a drop down menu, and fill it in with values that are saved in my sql database.
this is the code I am using:
$SQL = "Select category,Rest_ID From Category Where id = ...
0
votes
1answer
23 views
MySQL single statement to merge two tables
I'm sure this has been ask/answered already but I don't know how this kind of action is called and my SQL knowledge is limited.
I'm searching for a single SQL statement to merge two tables:
Table ...
0
votes
0answers
3 views
How to write trigger for finding rank in mysql?
My database table is
How to write trigger for finding rank based on the percentage value.
Thanks in advance...
0
votes
1answer
12 views
Connecting remotely to MySQL Database but saving the data in a local MySQL Database C#
my first question here, hope you guys can help.
I have a C# winforms "server" application that has a local MySQL database.
I also have a "client" application that I need to connect to the remote ...
0
votes
0answers
6 views
yii database host check
How can I check whether database host is valid?
try {
Yii::app()->db;
} catch (Exception $ex) {
echo $ex->getMessage();
}
Code above gives me this error when I use invalid ...
2
votes
2answers
23 views
Calculate time difference in MySQL
SELECT empno , date_created ,
min(CASE WHEN status = 0 THEN time_created END) time_in,
max(CASE WHEN status = 1 THEN time_created END) time_out
FROM biometrics
WHERE empno = 3
GROUP BY empno , ...
1
vote
0answers
19 views
How to select complex data from a table and delete it from the same table
I have a feedback table which contains user feedbacks and ratings as per some entity. There are cases in which multiple users have voted on the same entity which is not desirable and have entered the ...
0
votes
2answers
20 views
Mysql group by subsequent
I need a particular group by query.
I have a list of events with (title, start, end) fields
I would like to get a event title, number, first and last event rows grouping by title and subsequent ...
-1
votes
0answers
11 views
how can i create tree like structure in php. Using three Tables
I have three tables.
1- Region
2- Country
3- Company
Region table's id refers to the country and the country table's id to Company.
Tables look like:
REGION:
region_id | region_name | description
...
1
vote
3answers
33 views
LAST_INSERT_ID after restarting MySQL
I'm trying to retrieve the LAST_INSERT_ID by following statements after inserting a new record, it works fine.
SELECT LAST_INSERT_ID();
The problem
When Inserting a new record in table and ...
0
votes
0answers
8 views
Unable to Connect to JDBC Connection Pool from Glassfish
I am running GlassFish Server Open Source Edition 3.1.2.2 (build 5) with MySql
I have created a JDBC Connection Pool using NetBeans.
Googled this problem I found that adding it is a classpath issue.
...
0
votes
4answers
22 views
Update multiple fields based on mulitple values
I have a little issue that I can't figure out, basically a user fills in a form, this data saves into a table, but i have another table where based on some values will update a value in that table to ...
1
vote
1answer
42 views
How to put empty set in inner join
I am a complete beginner in MySql and I wanted you to help me. I want a DTR User Interface where there is time in and time out. So I have a fields like ...
0
votes
3answers
23 views
Filtering keyword from second table
I have two tables
Employees
id employee_name JobTitle
---------------------------
1 John CEO
2 Ely MANAGER
3 Marcus MANAGER
4 Steve ...
0
votes
0answers
7 views
Windows Task schedule MySQL query because LOAD DATA is not allowed in stored procedure
I just want to execute a command that reads a CSV file and store it into MySQL Db every day.
when i run this command it works fine "load data local infile 'C:/Users/Admin/Desktop/test.csv' into table ...