Category "mysql"

Running migrations with Rails in a Docker container with multiple container instances

I've seen lots of examples of making Docker containers for Rails applications. Typically they run a rails server and have a CMD that runs migrations/setup then

How can I delete rows from table A and table B if rows in table B don't exist

I have 2 tables and I need to delete rows from both tables if A.itemID does not exist in table B I've tried doing : DELETE a,b FROM A a, B b WHERE NOT E

How to view queries executed internally from dbeaver

When trying to DELETE, INSERT or UPDATE one more table rows inside Table editor (or by using the add, duplicate and delete buttons), i know that dbeaver execute

MYSQL rotate a returned data

I'm getting a data that return like this: | id | name | | 1 | customer1 | | 2 | customer2 | | 3 | customer3 | | 4 | customer4 | Now I want to rotate

How to view queries executed internally from dbeaver

When trying to DELETE, INSERT or UPDATE one more table rows inside Table editor (or by using the add, duplicate and delete buttons), i know that dbeaver execute

SQL placement join with student, friend, package

Issue: You are given three tables: Students, Friends and Packages. Students contains two columns: ID and Name. Friends contains two columns: ID and Friend_ID

Android Studio access MYSQL with JDBC

I've been trying to connect to MYSQL by using of JDBC for a while now but having no luck. I have my database set up already with some information inside and I'

Pages are working fine on localhost but not running on the hosting server

I created a PHP website which is working fine on my localhost but when I uploaded the same code on the server, it is showing me blank pages on the server. Prob

MySQL order by field in Eloquent

When I want to define a custom sort order in a MySQL query I can do something like this: ORDER BY FIELD(language,'USD','EUR','JPN') What would be the Eloquen

OpenResty / Lua - Maintain mysql database connection in worker threads

I have a simple module called "firewall.lua" that I wrote that has a function firewall.check_ip(ip) which connects to localhost mysql and performs a query and r

SQL ZOO List each continent and the name of the country that comes first alphabetically

Im confused why it could not be Select x.continent, x.name From world x Where x.name <= ALL (select y.name from world y where x.name=y.name) ORDER BY name

System.ArgumentNullException: Value cannot be null. (Parameter 'connectionString') asp.net Core Docker-compose

I have a dockerized asp.net Core application trying to connect to a mySql Database. Both are running inside a docker-compose. When I test the connection to a lo

Split comma separated value from table column into rows using mysql?

I found the post which has the column with 3 values seperated by commas. I will have more than 3 values seperated by commas . For example, ID CITY_ID ------

How to convert SQL Server query to MySQL (OUTER APPLY)

I'm trying to switch from SQL Server to MySQL, hence some queries need to be converted. The following SQL Server query gives my desired output: SELECT top 20 c.

MySql Query to find out first 50% of records from a Table

I am trying to fetch first 50% of records from a MySQL Table User. I know we can use limit or top for finding them but the total number of records are not fixed

Select a column with a keyword name

I have a table named 'test' It contains a column named 'AND' For that I use the following queries insert into test values ('a','abc'); insert into test value

MySQL subquery overview

Alright I am guessing I need a subquery to solve this and I am little rusty on these. So I have 3 tables: tblAccount - Has User information and AccountID tblIte

Why mySQLclient is not installed

I want to install the MySQLclient package on my Cpanel host through the terminal. Because I want to connect my Django project to the database. When I want to in

Access denied when making connection from php container to mysql container

I’ve been searching the web for hours but do not find any solution to my problem. I have 3 containers: - nginx - php - mysql They are all connected to th

MySQL Syntax Error when Select Count into inout Variable

Here is the code: CREATE PROCEDURE CountOrderByStatus( IN orderStatus VARCHAR(25), OUT total INT) BEGIN SELECT count(orderNumber) INTO total FROM orders WHERE