Category "mysql"

Add record for each array elements if missing in table

I feel like I need a little push to break through this one. I have this array of players $playerids = ['1', '2', '3', '4'] I have this array of periods $period

Laravel Database Strict Mode

I'm little wonder please help me out. My query is :- Invoice::join('orders', 'orders.invoice_id', '=', 'invoices.id')->groupBy('invoices.id')->get();

Find a record containing all or a part of a list of id of other table in a many-to-many relation on MySql/Jpa?

In my web application, I have 3 tables: TAB A: Recipes (id, name) TAB B: Recipes_Ingredients(id, fk_recipe,fk_ingredient, quantity) Bridge table TAB C: Ingredie

not able to connect to mysql docker from local

I am trying to connect to mysql database from docker image. However it's throwing errors. following is the docker image I am using. https://hub.docker.com/_/

find in set in laravel ? example

I am new in laravel. My query is i need to find out value from comma separated field. Here is my table: tags_value id tags 1 css,html,php 2 php,java,css 3 java

mysql slow on updates for a well optimized query

i am facing an issue with update state , which takes up to 4s on very small queries . Count: 1 Time=3.87s (3s) Lock=0.00s (0s) Rows=0.0 (0), ***[***]@localho

laravel 5.6 bulk inserting json data

I am trying to build an API to store and retrieve MCQ exam papers. I am using laravel resource class to send handle Json data. I need to insert 40 records into

merge two tables with different columns mysql

I want to merge two tables with different columns mysql. For e.g. Table 1 : ------------------------------------------------------------- item_id title sl

MySQL syntax Error on Create Trigger

Here is my trigger, I am getting the MySQL syntax error. I wanted to reduce the balance from sms_index table sms_count column value. CREATE TRIGGER sms_log_up

How to fix Error Code: 2068. LOAD DATA LOCAL INFILE file request rejected due to restrictions on access?

When I execute the code below I get Error Code: 29. File '/Applications/XAMPP/xamppfiles/htdocs/Gefle442/csv/places.csv' not found (Errcode: 13 "Permission deni

mySQL query to find multiple strings in any order within a single field?

In one column of a database, we store the parameters that we used to hit an API, for example if the API call was sample.api/call?foo=1&bar=2&foobar=3 th

Spring using windows user instead of given username 'root' to hit the mysql

Getting the error "Access denied for user 'DEll'@'localhost' (using password: YES)" In the spring xml file I have given the user as 'root' not dell. I ha

Are varchar(50) and varchar(10000) the same? [duplicate]

I have read a article that claim varchar(10000) would use more ram than varchar(50), but I have doubt with it. I have run a simple test: creat

MySQL Workbench host mismatch

I already installed MySql Workbench 6.3 in my laptop with an operating system of windows 10, but when I created a connection and open it there is an error which

Incorrect string value error for unconventional characters

So I'm using a wrapper to fetch user data from instagram. I want to select the display names for users, and store them in a MYSQL database. I'm having issues in

How is it possible for InnoDB to deadlock on a single row?

According to The Good Word, InnoDB uses automatic row-level locking. You can get deadlocks even in the case of transactions that just insert or delete a sin

How can i list data from table in the database in a browser

I'm developing a web application using reactjs nodejs and mysql database. I want to list the data created in a table i created in the database in the browser

Cannot access mysql database after migrating from Homestead to Sail

I am trying to migrate a Laravel 8 project from Homestead to Sail. Sail seems to be set up correctly since I can get to my project's website locally. But I can'

how to move from sqllite database to mysql database?

i want to move from SQLite database M, MySQL database. if i understood correctly, so i can do it with changing the engine: engine = create_engine('sqlite:///foo

How can I change the type of database in phpmyadmin from mariadb to mysql?

I'm using phpmyadmin with xampp on both of my home and work machines. Some queries didn't work for me when I was working on one computer, but it worked on anot