I have tricky one, I am trying for days to fix the issue. I have Reports and Subscriptions. I have specified one date for report.. (Report entity has reportDate filed) Idea is to return one result for that specific report day. Then in a query builder, I am triggering Subscriptions table that has startDate and…
Tag: mysql
What is the right approach to insert multiple id’s of petitions to single user?
I am very open to edits of the title Basically I am making a site about petitions. I want a user to be able to sign more than one petitions and be able to see list of petitions he signed. I am wondering what is the right approach to do it. Approach 1 that I thought of: Every petition has
Ubuntu – WordPress Installation Error – New Version 2020 – Your PHP installation appears to be missing the MySQL
I’m new in UBUNTU. I’ve installed: 1. php: (PHP 7.4.3 (cli) (built: Oct 6 2020 15:47:56) ( NTS )) 2. MySql: mysql Ver 8.0.22-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu)) 3. Server: Server version:…
Search function on multiple rows in the same table
I’m wondering how do I add more row’s on my search script to be searched. Here’s my php script: As you can see this: I want to it to search on region and rank rows. I tried: …. it’s showing 0 results. Thank you in advance. Answer Is this what you want? This searches for the param…
Mysql: Query which orders by default and rank (pin/hold up entries?)
I have a products table which contains all my products. Those products table gets filled permanently with new products. However, I want to have the possibility to “hold up”/”pin” certain products to a place in the returned query collection. Means, I want to set something like rank_inde…
Laravel Migration: “ERROR Class not found”
I’m new to Laravel, I’m building a small project with five tables: users, products, category, transactions, and a pivot table category_product. When I try to run the command Php artisan migrate I receive an error class “Transaction” not found here are the tables. User Table Reset Passw…
Too slow sql query [closed]
pls help me about this problem. I have two table, t1 with 50 000 row, t2 10 row, and the query is too slow. Any easiest way speed up? Thanks. $sql = $_db_->_sql_query(“SELECT date FROM t1 …
How to create html form to perform php query and retrieve results
I need to create a form with 5 fields in which a number will be entered in each, clicking a button a query is performed out based on the values entered in the fields and display the results within an html page. Thanks. Answer I achieved what I was looking for with the following: The form and javascript: Resul…
Attach images to product variants when creating a new product Laravel
i’m having difficulty attaching images to variants when creating new products. for example a product A with when I save this to the database, img1, img2, img3, img4 goes to both variant A1 and A2 instead of each variant to have its own images. How do I solve this? here is my controller Blade file Answer…
It’s only inserting the last value from a textarea
I’m placing a bunch of emails into a html textarea form. I need to insert the email addresses into my database so I’m using INSERT INTO but for some reason it’s only inserting the last value (email). I’m separating the emails with a line break when placing them into the textarea. (see …