So I have an another problem with my filtering system. I am getting my filtered results when I choose an option from the first dropdown I have. But I also get below the filtered results a block where …
Tag: database
I need to list the only latest versions of the products with php – mysql
I’m just trying to list the only latest versions of the products. Not all versions with the same product name. So this: Instead of this: *tables are not so important I just want the code to get the data. *tables are not so important I just want the code to get the data. This is my code but lists nothing
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 – Delete record from database if not exists in given array
I am fetching all my GitHub repositories using Campbells GitHub package for Laravel. I made a command and a cronjob which runs every minute and it works perfectly fine. The only problem is that when a …
How to store multiple values in a row, column or table? What is most efficient?
I have this problem where I want to create a data page where you can see how you’ve progressed in losing weight. I start by collecting their weight, but in order for me to actually do stuff with the data, I need multiple values. For example – Below is a picture of my colums, where vaegtUsers and hoejdeUsers is the
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