Database connected successfully!
Server info: 10.4.32-MariaDB
Host info: localhost via TCP/IP
| Field | Type | Null | Key | Default | Extra |
|---|---|---|---|---|---|
| course_id | int(11) | NO | PRI | auto_increment | |
| teacher_id | int(11) | NO | MUL | ||
| category_id | int(11) | NO | MUL | ||
| title | varchar(255) | NO | |||
| description | text | YES | |||
| thumbnail | varchar(255) | YES | |||
| price | decimal(10,2) | YES | 0.00 | ||
| is_published | tinyint(1) | YES | 0 | ||
| created_at | timestamp | NO | current_timestamp() | ||
| updated_at | timestamp | NO | current_timestamp() | on update current_timestamp() |
| Field | Type | Null | Key | Default | Extra |
|---|---|---|---|---|---|
| category_id | int(11) | NO | PRI | auto_increment | |
| category_name | varchar(100) | NO | |||
| description | text | YES | |||
| created_at | timestamp | NO | current_timestamp() |
| Constraint Name | Table | Column | Referenced Table | Referenced Column |
|---|---|---|---|---|
| courses_ibfk_1 | courses | teacher_id | users | user_id |
| courses_ibfk_2 | courses | category_id | categories | category_id |
| category_id | category_name | description | created_at |
|---|---|---|---|
| 1 | Programming | Learn programming languages and software development | 2025-06-13 18:00:04 |
| 2 | Mathematics | Mathematics courses from basic to advanced | 2025-06-13 18:00:04 |
| 3 | Business | Business, management, and entrepreneurship | 2025-06-13 18:00:04 |
| 4 | Science | Physics, chemistry, biology and more | 2025-06-13 18:00:04 |
| 5 | Languages | Learn new languages | 2025-06-13 18:00:04 |
| 6 | Technology | Modern tech trends and applications | 2025-06-13 18:00:04 |
| 7 | Arts | Creative arts and design principles | 2025-06-13 18:00:04 |
| course_id | teacher_id | category_id | title | description | thumbnail | price | is_published | created_at | updated_at |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 1 | Introduction to Python Programming | Learn Python programming from scratch with practical examples | /assets/images/courses/python.jpg | 49.99 | 1 | 2025-06-13 18:00:04 | 2025-06-13 18:00:04 |
| 2 | 3 | 2 | Advanced Mathematics | Take your math skills to the next level with advanced topics | /assets/images/courses/math.jpg | 39.99 | 1 | 2025-06-13 18:00:04 | 2025-06-13 18:00:04 |
| 3 | 2 | 1 | Web Development Bootcamp | Comprehensive web development course covering HTML, CSS, and JavaScript | /assets/images/courses/webdev.jpg | 59.99 | 1 | 2025-06-13 18:00:04 | 2025-06-13 18:00:04 |
| 4 | 3 | 4 | Introduction to Physics | Understand the fundamental principles of physics | /assets/images/courses/physics.jpg | 44.99 | 1 | 2025-06-13 18:00:04 | 2025-06-13 18:00:04 |
Category with ID 1 exists: {"category_id":"1","category_name":"Programming","description":"Learn programming languages and software development","created_at":"2025-06-13 18:00:04"}
INSERT INTO courses (teacher_id, title, description, category_id, thumbnail, price, is_published)
VALUES (6, 'Sample Course', 'This is a test description', 1, '../uploads/thumbnails/sample.jpg', 29.99, 1)Query would execute successfully!
Transaction rolled back, no data was inserted.
The category dropdown in the form has these values:
| Value (sent to server) | Display Text | Corresponding Category ID (if found) |
|---|---|---|
| programming | Programming | Checking... |
| design | Design | Checking... |
| business | Business | Checking... |
| marketing | Marketing | Checking... |
| language | Language | Checking... |
| other | Other | Checking... |
Check course_creation_debug.log for detailed operation logs.