A
A
annonimus2019-07-06 16:51:38
Laravel
annonimus, 2019-07-06 16:51:38

How and with what to find errors in MySQL database?

Good day to all!
Guys, on a site running Laravel, after patching phpmyadmin, errors appeared on some pages and the userapp.blade.php file was noticed late. I checked all the script files with a backup, there are no discrepancies. I uploaded the old database, everything works, but the site is full of new articles and I don’t want to lose them. It is necessary to verify and correct the bases with something, there are backups. That's just what and how to find exactly where the errors are? The database weighs about 200 MB. Using mysqlcheck...

mysqlcheck -u root -p --optimize --auto-repair --all-databases

gave no results.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jazzus, 2019-07-06
@annonimus

$follower->follower->username_slug
Is this how it should be here? Whether there are users in a DB according to these data?
Such things

$userinfo->following()->count()
$userinfo->following()->take(12)->get()

must be defined in variables in the controller so that there are no duplicate requests to the database from the view.
For this
there are named routes where you can pass parameters. Bottom line: you need to prepare collections/objects in the controller in advance, save them to variables, debug them with help , and then fetch the checked in the view and not make requests from it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question