I’m trying to code a custom rewrite rule for ‘.htaccess’ file in my Apache webserver. The main idea is to handle requests in the form: to ‘index.php’ file in the www_root: As everyone knows, this is easy to do. Just by adding below lines to ‘.htaccess’ file: But the p…
select all records and the rest
here is a simple mysqli query to select specific records from my mysql database: The question is: How can I get (best practices) all the other records, which will not be selected with this query filter? Answer Running successive, more or less identical, queries in a loop is fundamentally a bad way to do thing…
Is there a way to make a sidebar with the default Bootstrap 4 widget Yii2
I want to know if there is a way to make a sidebar with Bootstrap 4 default NavBar widget Answer https://github.com/kartik-v/yii2-widget-sidenav Helped me for this one, realy usefull.
PHP mysql Tree Child count and List All Child node level wise
I have a tree like and I want the output for requeted ID for example Admin my table structure is I have a method that returns Child count level wise but I also want to return the child list level-wise with child count level-wise like 2nd image output required. } Answer It sounds like you just want a way of
How to open an image at a URL with Intervention
I’m trying to open an image with Intervention use InterventionImageImageManagerStatic as Image; $image = Image::make(‘https://via.placeholder.com/300/09f/fff.png’); but when dumping it, there is …
PHP mail encoding issue
i found an issue with php mail sending. I need to encode the mail in UTF-8. The subject works fine, but the message is corrupted. This is my code And this is how the mail looks like Subject Nábor – Kolombooo From tvkolombooo@gmail.com Message T2Rwb3bEm8SPIG5hIG7DoWJvcjpLb2xvbWJvb28uCgoKRGlzY29yZDpLb2xvb…
How to show only those sellers who have created at-least one product
I have one sellers table where sellerid column is sno and I have products table where sellerid is sellerid , I want to get those sellers who are not blocked (there is column named flag in sellers table) and have created at least one product so I write this(or maybe copy this) Now I do my logic through: It is
laravel 8 migration error: Unknown column ‘batch’ in ‘order clause’ (SQL: select `migration` from `migrations` order by `batch` asc, `migration` asc)
[SOLVED] i new to Laravel and PHP. i tried to migrate my own migrations but i can’t. this my laravel and php information: my php info PHP 8.0.3 (cli) (built: Mar 4 2021 05:33:14) ( NTS ) Composer version 2.0.11 2021-02-24 Laravel 8.x mysql Server version: 10.5.9-MariaDB Arch Linux my OS info uname: Linu…
sql update multiple column in a foreach loop using prepared statement
Im studying this PHP script on how to prepare for multiple execution of a UPDATE statement. The script below shows update for 1 column using prepared statement. Example from PHP manual https://www.php.net/manual/en/function.sqlsrv-prepare.php What if I have multiple column to update, how do I create an array …
Problems when using join and pagination together in Laravel
I have some tables in my database and I’m trying to transact between them. My aim is to show the project name and the employees in that project in the form of cards on my projects page as in the image below. (Other than the method I mentioned, if there are better ways to do this, I ask you to