Skip to content
Advertisement

Tag: mysql

searching in large tables in laravel

I have some items from a table and I want to search for each item’s id in other 4 tables (that currently have around 5k-6k rows but will be larger in the future). I have to search through all tables (as above) and if I don’t find the item in one of the tables, I keep searching in the others.

Should you use prepared statments on LIMIT

One day I was googling to understand when a prepared statment should be used. As I searched online many claimed that you should use always prepared statments. Now the question I have is… does this also count for LIMIT? I mean it is possible (I tried) but is it really that rational? Same question on ORDER BY too. Answer When

Add New Record Value, & Previous Record Value MySQL

I am busy creating a new table in my DB, and have some issues populating the correct values. The table consists of a number of columns Using the UPDATE ON DUPLICATE KEY, is not an option here, as I need to keep each and every record, however, adding only the previous value to the new record. Existing Query: How do

Laravel Eloquent where statement returns no attributes

So from my previous post, I was advised to start using Eloquent models, which I did. My end goal, is to print out specific gifts, that belongs to that specific box. Migrations: gift_items: gift_campaigns: Pivot table: Controller: Error that I receive using this way: Seems like the updated version is trying to call the gift_campaigns table id, instead of the

code event[] calendar in laravel 8 not working

I created a calendar with laravel 8 and PHP 8,it is running ok in php 7 but I have to upgrade to php 8 because of the demands of the times I have successfully saved data in the database but the data in mysql does not appear in the calendar, even though I have used event[], I have checked that

How to delete file in my database Laravel

How do I delete files in the database, because when I click delete the data in the folder is deleted, but the data in the file_rekap tables don’t want to be deleted, but the ones in the rekap table are deleted RekapController: Model rekap and file_rekap and script in my rekap_blade How ti fix it ? Answer If you want

Advertisement