Skip to content
Advertisement

Tag: database

Database Announcements Table – Add Excutable Code Within

I have a database containing over 1,000 item information and I am now developing a system that will have this check the API source via a regular Cron Job adding new entries as they come. Usually, but not always the case, when a new item is released, it will have limited information, eg; Image and name only, more information like

Laravel select records with pivot table

I have a little problem with eloquent. I have 3 tables. Users, phrases, and phrase_user. phrase user contains columns: id, phrase_id, user_id I need to select phrases with pivot table for example. This action with SQL will be like this… This is my index function in controller I also have written these functions in models… Phrase model: User model: In

Symfony Imageboard post database schema

I’m making imageboard in symfony. I am curios if I’m doing it in the best way. There are threads and posts just like in normal forum. Thread 1 post 1 post 3 Thread 2 post 2 post 4 The problem is I made two entities Thread and Post. It’s easy to get all posts from one Thread but there are

Adding HTML codes inside PHP

I’m trying to add a view button to my table but I’m getting a syntax error, unexpected href. Seems like I’m wrong with the formatting. Still trying to learn PHP but is it possible to add href to the …

CakePHP 4 Modifying Query Results IN TABLE

I am looking for an example or explanation on how I can modify a query result every time a specific table is called. All the examples I’ve seen are mainly meant for the controller. I’m kind of looking for something similar to the old function afterFind(). My goal is to put a function within my Table file to automatically modify

For inside of for loop PHP

How i can assign to multiple categories multiple variants like colors, for example i have a product who can be in 3 categories but this product have 3 colors as variants how i can make a mysql structure to avoid insert in same row delimited by comma. There is what is tried: And what i want to do is to

Advertisement