Laravel Query Builder: insertOrIgnore to Ignore SQL Errors

Laravel Query Builder: insertOrIgnore to Ignore SQL Errors

Laravel Daily

2 года назад

5,490 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

rahma yudistira
rahma yudistira - 25.01.2023 15:26

Why method insertOrIgnore can't work at my postgreSql database, anyone can help me ?

Ответить
Chencho Tshering
Chencho Tshering - 15.02.2022 15:29

Thank you very much for the tips.

Can you also make video on how to set selected value of laravel vue next select dropdown with the value from database and tips on using vue next select.

Ответить
Mega Osama
Mega Osama - 15.02.2022 15:26

You are real superman 🥲❤️❤️👍🏽👍🏽 not necessary to be superman on Hollywood....

Ответить
Aurélien Martel
Aurélien Martel - 14.02.2022 19:14

I can see using this in importing CSV from a end user input.

If you want to fill the created_at (or created_by or any other field that is not null for other rows in database) your can still select where field is null and then update them all if the fields are nullable, else hydrate them before (with collections, there are plenty of tips from Laravel Daily)

Ответить
Ariana Romero
Ariana Romero - 14.02.2022 18:58

interesting but what happend with the integrity DB? maybe I will use it in a global table where his field doesn't have relationship any tables. mmmm I don't know, for example in this case, Email is very important for me integrity DB, If I have duplicated, this is fatal error for me DB.. mmm mmmmm mm ... Srry for my english.

Ответить
Neto
Neto - 14.02.2022 18:33

Hi,

Show us a video teaching how to make queue work, multitenancy and multidatabase.

Set database in Middleware in Kernel by subdomain

Ответить
Linas Gutauskas
Linas Gutauskas - 14.02.2022 17:29

Until now, i was doing try/catch. Thanks for the tip.

Ответить
Flankymanga
Flankymanga - 14.02.2022 15:39

Even when mysql and other databases do database dumps as backups there is an option to use insert ignore.

Ответить
albuslrc
albuslrc - 14.02.2022 14:03

I used insert or ignore recently to fix one migration that not ran in production.

Ответить
rd's Music Collections
rd's Music Collections - 14.02.2022 11:52

I run into error while exporting larg number of records to Excel. How to solve memory exception error? Using maatwebsite excel package. It works well with some records.

Ответить
Holiq Ibrahim
Holiq Ibrahim - 14.02.2022 10:26

A very helpful feature for validation, whether the user has created an account or not without having to select users table first

Ответить
turki alharbi
turki alharbi - 14.02.2022 09:40

Is there any way to update multiple records with single query?

Ответить
Khizer
Khizer - 14.02.2022 09:02

Helpful 🙂

Ответить
Gergely Csermely
Gergely Csermely - 14.02.2022 09:02

Thanks

Ответить