Category "mysql"

ERROR 1049 (42000): Unknown database 'tweetdata' Mysql

I have MySQL installed on an Ubuntu machine. When I run use TWEETDATA command it shows me following error ERROR 1049 (42000): Unknown database 'tweetdata' Bu

How to sort with nest order with Prisma

I have 2 table model Product { id name skus[] Sku } model Sku { id name price weight productId product Product } Data example: Product t

How to define a default value for a column after a cast in a pgloader script?

Let's say I'm migrating a MySQL database to PostgreSQL with pgloader, using the default sample on the official website: load database from mysql://

How to get the ID of the link in another page in php

I like to catch the id of below tag in show.php file once the link is clicked... I have already got the href name in show.php <?php if (isset($_GET['subm

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