Error while using LAST() aggregate function in SQL

MySQL
Recently i started working on a project. In which i want to fetch the last record inserted in the database. Query is: SELECT c.lat, c.lng, LAST(v.co...
7 months ago

Sending content from my frontend to my PHP/MySQL-backend

MySQL
When I send my content from my frontend it successfully reaches my if (!empty)-statement but the table in my phpmyadmin/mysql-database does not reciev...
7 months ago

multiple entries from variable date range

MySQL
i have a form on page1 that has 4 inputs (Name, startdate, enddate, reason). i want to add an entry into MySQL for every day from the date range (sta...
7 months ago

Increase pages with PHP and SQL with $_GET[""]

MySQL
Currently I am busy with a blog, but I get stuck at increasing pages, offset and limit. It is supposed to count up the page and show 10 rows at every ...
7 months ago

How can I use a foreign key and joins to get the info I need from mysql database

MySQL
I am currently achieving this with several steps, but it would be better if I could find what I need with one query. I think it's possible with joins ...
7 months ago

Can't login to with new passwrod to mysql console

MySQL
I am new o MySQL. I create a new user: CREATE USER 'geo'@'localhost' IDENTIFIED BY '12345'; GRANT ALL PRIVILEGES ON *.* TO 'geo'@'localhost' WITH GRA...
7 months ago

Getting the date and sending it through mysqli insert?

MySQL
Basically I've got a contact us form, and I would like to submit the date as well, when the submit button is pressed. Basically you fill out the boxes...
7 months ago

Displaying based on Results in Mysql Query

MySQL
I have an orders table in mysql and in that for some orders I set particular order status like 'review'. I want to setup a way if any order placed by...
7 months ago

Select two or multiple tables from different databases

MySQL
how to use two tables in a single query, which are in different databases, means, SELECT table1.id, table1.name, table2.id, table2.telephone FROM tab...
7 months ago

MYSQL inventory slots (add item to next slot free)

MySQL
$slt = mysql_query("select Slot, ItemId, UserId, max(Slot) Slot from useritems group by UserId"); while ($sloot = mysql_fetch_assoc($slt)...
7 months ago

MariaDB sql trigger to update if key exists or insert if doesn't exist?

MySQL
I'm new to SQL, but trying to build a simple trigger that will execute on each insertion. I want it to update some table values if the key already exi...
7 months ago

MySQL - find and fix incorrect characters

MySQL
I have a table in MySQL that contains people's names and now some people are putting in characters with accents. Whatever original character set/colla...
7 months ago

How to Limit selection in checklist created directly from MYSQL database and PHP (*Not by manually making a checklist in HTML*)

MySQL
My code so far outputs data from mysql table on a website as a checklist, but I am having trouble setting a limit to how many options can be checked o...
7 months ago

Complex MySQL statement causing error

MySQL
I am trying to combine two working sql statements into one working sql statement. Here are the two sql statements that each work when done seperatel...
7 months ago

Stuck in creating a Simple procedure in MySQL [IF statement]

MySQL
I want to create a procedure in MySql using IF statement that would let me show the names of all students who's average is above 70 when I give the id...
7 months ago

Replace id foreign key with username in query result

MySQL
I have this query which works: SELECT id, SUM(points) AS points FROM leaderboard WHERE roundtime BETWEEN LOCALTIMESTAMP - INTERVAL '24 hours' AND LO...
7 months ago

Mysql count per distinct user with a join

MySQL
currently i have two tables with some data. the first table has the following: +----------------+-----------+ | name | member_id | +-------...
7 months ago

Ranking tied results in MYSQL

MySQL
I have a MYSQL table which looks something like this: ID | NAME CODE | SCORE 1: A01: 1 2: A01: 4 3: A01: 5 4: A02: 2 5: A02: 3 6: A02: 3 7: A02: 7 ...
7 months ago

Order MySQL result by column value

MySQL
I'm sorry if this is bad being my 2nd post today, but I need a little help one more time. I have table in mysql DB which holds some products( id, name...
7 months ago

How to use an OUT paramter / read data with SELECT from table in a MySQL procedure

MySQL
I am new in creating procedures in MySql and still learning it. So, I am stuck in creating procedures and need help. The question might seem basic but...
7 months ago