Drop files here

SQL upload ( 0 ) x -

Page-related settings Click on the bar to scroll to top of page
Press Ctrl+Enter to execute query Press Enter to execute query
ascending
descending
Order:
Debug SQL
Count
Execution order
Time taken
Order by:
Group queries
Ungroup queries
Collapse Expand Show trace Hide trace Count : Time taken :
Bookmarks
Refresh
Add
No bookmarks
Add bookmark
Options
Set default





Collapse Expand Requery Edit Explain Profiling Bookmark Query failed Database : Queried time :
Browse mode
Customize browse mode.
Browse mode
Documentation Use only icons, only text or both. Restore default value
Documentation Use only icons, only text or both. Restore default value
Documentation Whether a user should be displayed a "show all (rows)" button. Restore default value
Documentation Number of rows displayed when browsing a result set. If the result set contains more rows, "Previous" and "Next" links will be shown. Restore default value
Documentation SMART - i.e. descending order for columns of type TIME, DATE, DATETIME and TIMESTAMP, ascending order otherwise. Restore default value
Documentation Highlight row pointed by the mouse cursor. Restore default value
Documentation Highlight selected rows. Restore default value
Documentation Restore default value
Documentation Restore default value
Documentation Repeat the headers every X cells, 0 deactivates this feature. Restore default value
Documentation Maximum number of characters shown in any non-numeric column on browse view. Restore default value
Documentation These are Edit, Copy and Delete links. Restore default value
Documentation Whether to show row links even in the absence of a unique key. Restore default value
Documentation Default sort order for tables with a primary key. Restore default value
Documentation When browsing tables, the sorting of each table is remembered. Restore default value
Documentation For display Options Restore default value
SELECT * FROM `stock_movements` ORDER BY `movement_type` ASC 
Edit inline ] [ Edit ] [ Explain SQL ] [ Create PHP code ] [ Refresh ]
Full texts id product_id
FK อ้างอิง products
movement_type Ascending Descending 1
ประเภทการเคลื่อนไหว
quantity_change
จำนวนที่เปลี่ยนแปลง (+ สำหรับเข้า, - สำหรับออก)
stock_after_move
สต็อกคงเหลือหลังการเปลี่ยนแปลง
related_treatment_item_id
FK อ้างอิง treatment_items (ถ้าเป็นการตัดจ่ายจากกา…
movement_datetime
วันเวลาที่เกิดรายการ
notes
หมายเหตุ
user_id
FK อ้างอิง users (ผู้ทำรายการ)
created_at
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 8
8 1 1.00 8.00 NULL 2025-04-15 22:56:56 Update Treatment #21 (Item #24) 1 2025-04-15 22:56:56
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 9
9 1 -2.00 6.00 NULL 2025-04-15 22:57:05 Update Treatment #21 (Item #24) 1 2025-04-15 22:57:05
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 19
19 1 1.00 13.00 NULL 2025-04-16 00:27:49 Reversed from deleted Treatment Item #27 (Treatmen... 1 2025-04-16 00:27:49
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 21
21 1 -1.00 11.00 NULL 2025-04-16 16:56:58 Update Treatment #23 (Item #28) 1 2025-04-16 16:56:58
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 22
22 1 2.00 13.00 NULL 2025-04-16 16:57:53 Reversed from deleted Treatment Item #28 (Treatmen... 1 2025-04-16 16:57:53
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 23
23 1 1.00 14.00 NULL 2025-04-16 17:18:30 Reversed from deleted Treatment Item #29 (Treatmen... 1 2025-04-16 17:18:30
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 24
24 1 1.00 15.00 NULL 2025-04-16 17:20:54 Reversed from deleted Treatment Item #30 (Treatmen... 1 2025-04-16 17:20:54
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 25
25 1 1.00 16.00 NULL 2025-04-16 17:22:09 Reversed from deleted Treatment Item #31 (Treatmen... 1 2025-04-16 17:22:09
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 1
1 1 Stock In 5.00 5.00 NULL 2025-04-13 23:05:00 SL Supply 1 2025-04-13 23:06:06
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 2
2 1 Stock In 3.00 8.00 NULL 2025-04-15 12:14:00 NULL 1 2025-04-15 12:14:08
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 10
10 1 Stock In 2.00 8.00 NULL 2025-04-15 23:21:25 PO#1 1 2025-04-15 23:21:25
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 11
11 1 Stock In 1.00 9.00 NULL 2025-04-15 23:21:46 PO#2 1 2025-04-15 23:21:46
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 3
3 1 Stock Out - Treatment -1.00 7.00 NULL 2025-04-15 21:54:33 Used in Treatment #20 (Item #23) 1 2025-04-15 21:54:33
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 4
4 1 Stock Out - Treatment -1.00 6.00 NULL 2025-04-15 22:17:34 Used in Treatment #21 (Item #24) 1 2025-04-15 22:17:34
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 5
5 1 Stock Out - Treatment 1.00 7.00 NULL 2025-04-15 22:31:34 Update Treatment #21 (Item #24) 1 2025-04-15 22:31:34
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 6
6 1 Stock Out - Treatment 1.00 8.00 NULL 2025-04-15 22:32:35 Update Treatment #21 (Item #24) 1 2025-04-15 22:32:35
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 7
7 1 Stock Out - Treatment -1.00 7.00 NULL 2025-04-15 22:45:22 Update Treatment #21 (Item #24) 1 2025-04-15 22:45:22
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 14
14 1 Stock Out - Treatment -1.00 8.00 NULL 2025-04-15 23:24:03 Used in Treatment #22 (Item #25) 1 2025-04-15 23:24:03
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 20
20 1 Stock Out - Treatment -1.00 12.00 NULL 2025-04-16 16:56:31 Used in Treatment #23 (Item #28) 1 2025-04-16 16:56:31
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 31
31 1 Stock Out - Treatment -1.00 19.00 NULL 2025-04-17 17:53:03 Used in Treatment #23 (New Item #36) 1 2025-04-17 17:53:03
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 34
34 1 Stock Out - Treatment -6.00 13.00 NULL 2025-04-22 22:33:43 Used in Treatment #22 (New Item #38) 1 2025-04-22 22:33:43
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 38
38 1 Stock Out - Treatment -2.00 13.00 648 2025-11-25 22:36:51 Used in Treatment #368 (Item #648) 1 2025-11-25 22:36:51
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 39
39 1 Stock Out - Treatment -1.00 12.00 852 2026-01-12 22:23:32 Used in Treatment #485 (Item #852) 1 2026-01-12 22:23:32
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 12
12 1 Adjustment + 1.00 10.00 NULL 2025-04-15 23:22:23 ยืม 1 2025-04-15 23:22:23
Edit Edit Copy Copy Delete Delete
DELETE FROM stock_movements WHERE `stock_movements`.`id` = 15
15 1 Adjustment + 1.00 9.00 NULL 2025-04-15 23:24:39 Reversed due to unlinking in Treatment #22 1 2025-04-15 23:24:39
With selected: With selected:
Query results operations Copy to clipboard Copy to clipboard Export Export Display chart Display chart Create view Create view
Bookmark this SQL query Bookmark this SQL query