Skip to content
Advertisement

Tag: database

How to use PDO::FETCH_CLASS with __set() method?

I want to create an object right after fetching data from my database. For that I’m using PDO::FETCH_CLASS and a rewritten __set() method that I’ve put in a trait. However, I can’t figure out why I have an error mentionning : “Fatal error: Uncaught ArgumentCountError: Too few arguments to function Banner::__construct(), 0 passed and exactly 1 expected in D:Logicielswamp64wwwprojet-4writer-blogentityBanner.php on

How to get list of movies based on genre and language

I have stuck to get list of movies based on genre and language. Here’s my database structure: movies table ———————– id | title| ———————- 1 | ABC 2 | PQR 3 | MNC category table ———————– id | catgory | value ———————- 1 | language |Hindi 2 | language |Endilish 3 | genre |Drama 4 | genre |Action 5 |

How to update a database table data from an PHP array?

I need to update the information of a mysql table database from a php array. I’m looking for the best approach to do this, what I want to do is to update an existing database table with new information, this means that there could be new rows, the existing rows could have new values in their fields, or rows deleted.

Magento 2 Category SEO friendly URLS

I have a Magento 2 website and require some direction with setting up sub-category urls to be SEO friendly. The Navigation menu work just fine i.e Grooming Kit www.mywebsite.com/product-grooming-kit.html the issue i’m having is with sub-categories in the left sidebar filters which when a specific category is clicked on it displays as following url with a number id www.mywebsite.com/product-grooming-kit.html?grooming-kit=32 I

watch database and wait for changes in laravel

i have a messaging system app and every message has some status in it with 3 types of done , in progress,not started so when i send a message to user B its not started for example so when user B receive the message he changes the status to in progress here i want to send a notification to the

Yii2 Migration move data to other table

I have table: and I have created table I want to move some data(date_used & used_by_user_id) from table ticket to other table used with migration yii2 in the query. But I don’t know how to do it without ActiveRecord & array. Answer Only sql. Yii-migration not supported select in the insert into

How to see full query in New Relic

When I go to APM > Applications > PHP Application > Databases it shows the list of queries and their performance. But the queries are shown like

select. How can I see the full query?…

Advertisement