I’ve got a function in my Laravel 8 API that deletes a user’s account, it also deletes any of data in any other table where their user_id matches the one of the account that’s being deleted. One thing has become apparant quite quickly with this, is how can this be scaled, and whether there’s a better, potentially faster and more
Tag: sql
sql, effecting different rows with different buttons
i have a project looks like this. i want to view picture then want to write something about this picture. the “gönder” button should effect the right above picture. i want to add these to …
creating a check for a single column of fetched data PHP sql
So I’m working a module of a Hotel Website which is Wine List and data is fetched dynamically and there are multiple categories of wines. I am showing them all according to their category and I also want to have a title above the wines of a single category.. e.g Wine A is a category and i want all those
update sql table from two tables Using a single query
i want to update a table column by taking i/p from two tables in a single query. This is what i have tried. But this is not updating the table. Where Table-all_stores is: And table-i_v is: Answer if I understand correctly , you want to do this :
How to select from chldren with parent table as one row
I’m struggling to fetch all results from member_details table as one row and group them by memberId. Here is my tables structure: //members //member_details //result table view //sql Answer you can use case expression as following
Data from 2 tables is not displaying on the same page
I’m a newbie in PHP and mySQL, I’m currently working on a profile page where I will display the logged in user’s personal information from one table called users and also display the tours that they will book in the future from my website from this table: booking I’m fetching the data from users table with prepared statement which will
Why is the following SQL Query returning an empty result?
I have the following table structures: 1 – Course(course_id, course_nam, language, course_price, create_date, average_rating, category, course_description, certifica_price, course_creator_id) 2 – Student(student_id, wallet) 3 – Discount(discount_id, discounted_course_id, allower_course_creator_id, is_allowed, start_date, end_date, percentage) 4 – Enrolls(student_id, course_id, purchased_price, purchase_date) I want to write a query which will return every course of a course creator with id=$person_id along with the followings: 1 –
Is there any way to optimize the query while working with 2mil+ rows database table
I am working on Laravel query that shall count the latest month data and also group by week, for the last 3 months. I have tried to fix that in a few ways but still it’s exceeds my memory limit and load very slow. Bellow is the current code that I am using to get the final results – but
Pass GET Variable to Modal to use in Query
I am trying to build a budget lookup tool. I have form where someone enters an account#, fund#, and deptID#. When they hit search, it opens a modal and will display a table of the budget balances that match the entered fund, account, and deptID. I can get the modal to open but, I can’t seem to get the data
PHP: Trying to insert dates in Database
I want to insert all the dates between a starting and an end date into a table in my database. I already found a code for the two dates and the dates between. The problem now is that the dates are not inserted into my database when running the code. Only 0000-00-00 is displayed in my date table. Also no