Skip to content

Tag: sql

Updating multiple tables in SQL using an Array

Currently I had a table called crm_leads for my Leads page where I already have many records. Now for the same page I have created few new fields which is now going to be stored in another table called crm_leads_details. Now I’m storing all my POST values in an array format like so: Now in my model I&#8…

Updating stocks quantity in Product Table from Cart

Hello everyone so basically I have this 2 tables ProductLists and Cart Note: Cart table contains temporary datas inside it, if the orders inside cart table are already paid the table itself will truncate. I tried running this query and this happened output any advice on how to do this without making the stock…

Why do these two SQL queries return a different number of rows?

If I execute the following query in Workbench, I get back the expected number of rows — 5. However if I enter the same user_id in the search field of my web app it returns ALL orders, whether or not it has been refunded, but still lists the total number of refunds as 5. Any help is appreciated. Answer B…

Hiding a button dependant on cell value in table

I currently have a table that data is being reported into with a few buttons at the end to perform actions (Consign, Unconsign, Edit, Delete). I’m trying to hide the Consign and Unconsign buttons for each row in the table depending on the Yes/No value a column. So far, I’ve managed to get the butt…