I am setting up a new API, I am wanting to display selected info from a Mysql database with a ‘SELECT columns WHERE column LIKE % ?’, but I’am getting error in ‘%’ symbol, where I must insert ‘%’ …
Tag: php
How to Group By some id and Sum all row json encode data
I have Faced group by some id and Sum other column json_encode data in select query MySQL. But how to sum total json data value? Please help Anyone… Using this, PHP 7.2, Mysql 5 and Apache 2. …
How to adress variable Columns of SQL query with TWIG
I am trying to address a specific column of a SQL query depending on the value of another row from the query. The result I am getting from the SQL query is something like this: Number | Value1 | …
Filter data from database with multiple user selections
Currently I’m developing a search form so my SQL query needs to change with user input. Please see the below code sample. $sqlSearch = “SELECT * FROM seafarers WHERE “; if ($dateS != “”) { $…
Filter orders by product post type in WooCommerce admin orders list page
I am new to WooCommerce, And I want to customize admin order list page. So basically I created new product type. Now I also made restriction that customer can purchase my custom product type’s product …
PHP why doesn’t my filtering works as it should be
So, I have to do a web store, where a person can filter the products. I have added the button [pod 300€] and [vsi izdelki]. But now when I click on button [pod 300€] it shows the products which are …
Is there effective way in laravel to select records from database and set them user_id?
I have to make laravel application that use database 100k+ records. I have table with columns: numer, date, segment, user_id. I am selecting records that I need with: $datetime = new DateTime(); $…
Convert Raw SQL ‘NOT’ IN (too slow) to Laravel Eloquent
I have a running script using Raw SQL in Laravel 5.3 controller which I found it slow and not secure ( as Raw ). If there any way to make it more effecient and convert it to eloquent or Query Builder …
Showing multi row in one row
I am developing a page where I have to show all the jobs of an employee with a work number and the total of each type of hours in each work I can display it, but, my problem is when the employer …
value from database not appearing into php
i have created a cart website using sql, html and php. the cart button is as below: <input type="hidden" value="' . $product['…