Skip to content
Advertisement

Tag: php

Working with Doctrine array of enum and store it in a separate table

I’m currently building Entity model and one of my Doctrine Entities have ManyToMany relation with an external dictionary (like ENUM). So the entity field will be an Array of Enum. I’m looking for a way to have it as an array field on my entity, but to store it as a separate DB table. Would like to get any advice/links/etc.

Login timeout expired with PDO sqlsrv connection. Able to query with TSQL just fine from same RHEL 8 client

I’m getting “Login timeout expired” with the following connection attempt: If I add LoginTimeout: The script returns a Bad Gateway error. I’m at my wits end and am unsure what I’m missing. Details below. This is a RHEL 8.3 system with PHP 7.4.6 installed. RemoteSQLServer is a remote Windows system running SQLServer 2012. I’m able to successfully connect just to

Symfony access headers in custom validator constraint

I am trying to access the headers of my request in a custom validator constraint like so: But the headerBag in $this->request is always an empty array unfortunately. Is there maybe an issue because I extend the symfony count validator? Answer You should ingest RequestStack instead of Request See the documentation

Laravel list with unique values and count of values

Im trying show unique values from database with count of them in table view. But i have problem count them. my goal is show in table my controller dd($userList) show 1 john and 1 smith dashboard.blade error : Call to undefined method stdClass::count() Answer Use this code: And in your blade use this code:

Allow access to any order on front-end on WooCommerce

My goal is to allow certain role to view any order in shop. While displaying all orders in “My Account” page is relatively easy, accessing particular order created by different user always ends up with “Invalid order. My account” error. So far I have added custom query on woocommerce_my_account_my_orders_query filter, so that one can view all orders made by accounts

How to text-to-speech a PHP table

I’m working on a project where I have a table containing a list of students, I want my web-app to “say” their name and last names one by one, the same as when a teacher is marking who’s present or not. I dont know if the technology to go to in this situation is Javascript or PHP, although it looks

Advertisement