Using Laravel 8 for a restful API. A table in the database has following fields report_date , supervisor_id and supervisor_note I want to retrieve a result that counts the number of reports on any given day date and also counts all of the null values in supervisor_notes field. I am using the following Laravel code: I don’t know how to
Tag: mysql
Flutter/MySQL: How to pass URLs from mysql database to PageView/ImageSlider Widget?
I would like to pass a dynamic number of image url’s from my mysql database to a PageView Widget as a simple ImageSlider. Problem: Several type errors like “the argument type ‘List(ImageList)’ can’t be assigned to the parameter type String.” OR “type List(dynamic) is not a subtype of type List(String)”etc., if i pass the selection to the Widget. Question: How
Insert two values into MariaDB table using a textarea in HTML – PHP
I’m trying to add some text from a TEXTAREA in HTML to my table in mariaDB using PHP in Linux. Basically the form has two “boxes”. One to identify the user and the second one to add a text. If the user have already added a text, will not be possible to add more text. I am struggling to add
Get original and current prices with a subquery in MySQL with PHP
I have a table of ads and another of prices, relative to these ads. When the user modifies a price in the application, a new row is added to the prices table, which includes the price and the date the price was modified. I need to get a list with all the ads and, for each ad, the first price
Connecting Database Codeigniter 4 With Custom Ports
So, I’m trying to connect to my database container from my webserver container. I currently use Codeignter 4 for my PHP framework. Everything goes well in terms of communicating between different containers because that container is inside the same networks. Inside webserver container, I’ve tried to ping from and to database container with no problem, All the port is accessible
Get API over VPN with PHP [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last year. Improve this question I have a question with my problem. I have a task where I want to get the REST API but the API is through a VPN.
How to Add the Quantity of Duplicate Products entries. If the Product Quantity is Less than 8 return it
In my API. I have a product table with attributes product_id, category_id, item_id, size_id, brand_id, product_price, product_quantity, location_id, product_manufacture, product_expire, created_at And I am returning the products information’s response of which quantity is less than 8. Here I am previewing data in client side. This is code which is returning the product information. But I have same product entries more
Leads to HTTP ERROR 500 PHP and SQL and i canĀ“t solve it
I m trying to show on a page {“status”:1} but instead it gives an error 500. All my code it seems to be working on database and on the plataform. It gives this errors on error log: [error] 42094#0: *233568 FastCGI sent in stderr: “PHP message: PHP Notice: Undefined index: id in /var/www/…/…/…/…/classes/pageuser.class.php on line 519 PHP message: PHP Fatal
Filter qry to get data according to Another Table
This is query to get all categories available in database. to get this output So, i am trying to get only that categories listed in rma_mapping_category(this has category_id column) so i tried this, but syntax got wrong by adding this(AND rma_mapping_category rma)… ///////////////////// Also tried this… ////////////////////// by this i am getting all categories rather than just rma_mapping_category Same result
Laravel hasMany with condition based on additional relationship
In my issue, I have a shop. A shop has many aisles and each aisle has many items. I have created 3 tables: Shop -> id and name Aisles -> id, shop_id, name Aisle_items -> id, aisle_id, name I’m trying to retrieve the shop and a list of aisles that have items in a single query. My shop model has