I have column in my table where it stores prices and I need to sum those prices, the issue is I need to cut specific amount from each row before sum them. Example I don’t want to just sum this numbers, what I need is cut 5000 from each row value and then sum the rest. So my total after
Unable to start docker-compose
I’m trying to configure sendy to run on docker-compose. I’m getting this error when running docker-compose up error docker-compose.yml Answer In the directory where that docker-compose file exists, is there a Dockerfile specifically called “Dockerfile”? Under your sendy service, you have the context as the current directory, but no Dockerfile specified. By default, it will look for a file called
Using double curly Vue.js braces inside php string param
So I’m in the middle of mixing Vue.js, PHP & HTML and I’m running into a small issue – I have the following HTML section: Now everything works great except calling the Vue.js title inside the PHP code.. I have the following: Is it possible to invoke double curly braces inside a PHP param? I have the HTML version (<span
Stay on same page when changing language
When I change the language on the page everything changes and starts from the main page (“index.php?lang=en”) but the question is, when I am in “about.php” I want to stay on the same page “about.php?lang=en”…. who can help me to realize that? <a href=”index.php?lang=en” class=”dropdown-item _chng-link”>english</a> <a href=”index.php?lang=ru” class=”dropdown-item _chng-link”>russian</a> Answer This will give you a good direction and cleaner
Docker – Nginx, PHP, MySQL – Laravel artisan migrate connection refused
I have Laravel running in Docker with 3 containers – Nginx, MySQL 8 And PHP 8. I have the following docker-compose.yaml This command: Launches 3 containers: I want to run php artisan migrate, so I try it like so: This gives me the following error: My mysql.env file is like so: AND .env: I’ve tried changing ports, host, but I
Display vendor store-name (Dokan) on WooCommerce admin order preview
We add vendor information in the admin order details for each order via: WooCommerce show vendor store-name (Dokan) in admin order details overview Now I also want to add this information also in the order preview. I found this answer Display custom data on Woocommerce admin order preview We change the hook to woocommerce_admin_order_preview_end but now when we want to
Change Primary ID in laravel Migration
I’m creating a table where I want to use the ID from this table “menu_items” to be added in another table Table one: menu_items Table 2 products My aim of doing this is that I can then create a relationship between the 2 tables as they have the same key? Is there a different approach I can take? Should I
html form not using POST – acting funny [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed last year. Improve this question I made bootstrap a form with this code and i am loosing my mind,
PHP cookies and redirection
I have a website in two languages: English and French. And I want to redirect people based on their browser languages: if there browser language is French, I redirect people on /fr, else they go to …
preg_replace vs ereg_replace vs str_replace On This Particular Case
Using PHP, I want to generate custom MySQL dump file (due to cannot use exec and a few other reasons). So I found these 2 similar solutions: https://www.kvcodes.com/2017/10/php-create-mysql-backup …